]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/file-name.cc
(dos_to_posix)[__CYGWIN__]: Return
[lilypond.git] / flower / file-name.cc
index b29307814513ccca6d0150a8203eb56482422000..2064e072613fa598908a01b467068f3d65512b69 100644 (file)
@@ -40,12 +40,14 @@ using namespace std;
 static String
 dos_to_posix (String file_name)
 {
-  char buf[PATH_MAX];
+  char buf[PATH_MAX] = "";
   char *s = file_name.get_copy_str0 ();
-  /* urg, wtf? char const* argument gets modified! */
-  cygwin_conv_to_posix_path (s, buf);
+  /* ugh: char const* argument gets modified.  */
+  int fail = cygwin_conv_to_posix_path (s, buf);
   delete s;
-  return buf;
+  if (!fail)
+    return buf;
+  return file_name;
 }
 #endif /* __CYGWIN__ */