]> cygwin.com Git - cygwin-apps/cygutils.git/commitdiff
Support file:// and mailto: URLs in cygstart
authorCharles Wilson <cygwin@cwilson.fastmail.fm>
Wed, 11 Apr 2012 02:13:35 +0000 (02:13 +0000)
committerCharles Wilson <cygwin@cwilson.fastmail.fm>
Wed, 11 Apr 2012 02:13:35 +0000 (02:13 +0000)
ChangeLog
NEWS
src/cygstart/cygstart.c

index 284bc90015cbb145047d5153a03c53cf2cea0146..2b0f5864ee7f2b61d8b4d45d096e5d2973dadcaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-30  Yaakov Selkowitz  <yselkowitz@...>
+
+       * src/cygstart/cygstart.c (cygStart): Handle file: and mailto: URIs.
+       * NEWS: Document.
+
 2012-04-09  Charles Wilson  <cwilson@...>
 
        Support new cygwin-1.7.13+ clipboard format.
diff --git a/NEWS b/NEWS
index 9965bc35576206652cab20e318c22b80eeea9652..764b912351ef98da5a6b5e062cfaa0d7204cdd4c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
 1.4.10
   * getclip and putclip now support new cygwin-1.7.13+ clipboard format.
+  * cygstart now supports file:// and mailto: URLs (Yaakov Selkowitz)
 
 1.4.8
   * Integrate cygstart with FD.o menu and mimetype system.
index fb757c821a67c56f489a4f9c894af8efa2009081..be7e0f9ead90087dc52bdddd7640007950039739 100644 (file)
@@ -580,9 +580,11 @@ cygStart (const char *aPath, const wchar_t * action,
   const wchar_t *pWinDir = NULL;
   int rc = 0;
 
+  if (strncmp (aPath, "file://", 7) == 0)
+    aPath += 7;
 #ifdef __CYGWIN__
   /* Convert file path from POSIX to Windows, unless it looks like a URL */
-  if (!strstr (aPath, "://"))
+  if (!strstr (aPath, "://") && strncmp (aPath, "mailto:", 7) != 0)
     {
       rc = cygstart_posix_to_win_w (aPath, &winPath);
       if (rc) goto cleanup;
This page took 0.025818 seconds and 5 git commands to generate.