[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC patch: "cd" to root dir
From: |
Michael Goffioul |
Subject: |
MSVC patch: "cd" to root dir |
Date: |
Sun, 14 Jan 2007 13:16:01 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (Windows/20061207) |
This patch solves a problem under Win32: you can't "cd" to root dir. Indeed,
you need a final backslash for the function "chdir" to succeed.
Michael.
Index: liboctave/lo-sysdep.cc
===================================================================
RCS file: /cvs/octave/liboctave/lo-sysdep.cc,v
retrieving revision 1.11
diff -c -r1.11 lo-sysdep.cc
*** liboctave/lo-sysdep.cc 6 Dec 2006 20:23:18 -0000 1.11
--- liboctave/lo-sysdep.cc 14 Jan 2007 12:13:11 -0000
***************
*** 89,94 ****
--- 89,98 ----
return retval;
#else
+ #if defined (__WIN32__)
+ if (path.length() == 2 && path[1] == ':')
+ path += "\\";
+ #endif
return chdir (path.c_str ());
#endif
}
- MSVC patch: "cd" to root dir,
Michael Goffioul <=