]> cygwin.com Git - cygwin-apps/cygutils.git/commitdiff
cygstart: allow relative paths
authorCharles Wilson <cygwin@cwilson.fastmail.fm>
Mon, 16 Aug 2010 17:05:16 +0000 (17:05 +0000)
committerCharles Wilson <cygwin@cwilson.fastmail.fm>
Mon, 16 Aug 2010 17:05:16 +0000 (17:05 +0000)
ChangeLog
NEWS
src/cygstart/cygstart.c

index 5de3205af6a50d85a1cafe12b13db3cb978ff9d6..bbcaffffee709b3c86f3fdc1ba264e0fa2eed151 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-16  Charles Wilson  <cwilson@...>
+
+       * cygstart.c (cygstart_posix_to_win_w): Use CCP_RELATIVE
+       when converting paths; enables 'cygstart calc'. Reported
+       by Ken Hirsch.
+       * NEWS: Document.
+
 2010-08-16  Charles Wilson  <cwilson@...>
 
        * cygstart.1: Update URL for reference to MS 'ShellExecute'
diff --git a/NEWS b/NEWS
index 9fb7253eb12adea7d1b6863a57fcc12d6008aa52..39a00879bdfdb001e6a6d3b78aa1f81364caad0d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@
   * ascii: by default, now only prints characters 0..127. Use new
     option --extended/-e for old behavior, printing characters 0..255.
     See this thread: http://cygwin.com/ml/cygwin/2010-04/msg00600.html
+  * cygstart: Fix --reference. Allow relative paths (enables, e.g.
+    'cygstart calc'). Reported by Ken Hirsch.
+    http://cygwin.com/ml/cygwin/2010-01/msg01101.html
   * Updated license for lpr to GPLv3+ (with permission from
     Rick Rankin)
   * Updated license for readshortcut to GPLv3+ (with permission
index e2b9708193a7016ecad4c16692de3ad13a1b816e..fb757c821a67c56f489a4f9c894af8efa2009081 100644 (file)
@@ -489,7 +489,8 @@ static int
 cygstart_posix_to_win_w (const char *posix_mbs_path, wchar_t **w32_wcs_path)
 {
   int rc = 0;
-  ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_W, posix_mbs_path, NULL, 0);
+  ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_W|CCP_RELATIVE,
+                                  posix_mbs_path, NULL, 0);
   if (len < 0)
     {
       fprintf (stderr,
@@ -507,7 +508,8 @@ cygstart_posix_to_win_w (const char *posix_mbs_path, wchar_t **w32_wcs_path)
       goto err_cleanup;
     }
 
-  if (cygwin_conv_path (CCP_POSIX_TO_WIN_W, posix_mbs_path, *w32_wcs_path,
+  if (cygwin_conv_path (CCP_POSIX_TO_WIN_W|CCP_RELATIVE,
+                        posix_mbs_path, *w32_wcs_path,
                         (len + 1) * sizeof (wchar_t)) < 0)
     {
       fprintf (stderr,
This page took 0.032509 seconds and 5 git commands to generate.