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__ */