* dir.cc (writable_directory): handle root directories

This commit is contained in:
DJ Delorie 2000-05-23 19:25:18 +00:00
parent 6eb63adf97
commit 98c6450eaa
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2000-05-23 DJ Delorie <dj@cygnus.com>
* dir.cc (writable_directory): handle root directories
Tue May 23 10:09:26 2000 Christopher Faylor <cgf@cygnus.com>
* uname.cc (uname): Use a "s" to denote a snapshot to avoid confusion

View File

@ -31,6 +31,10 @@ writable_directory (const char *file)
char *slash = strrchr (dir, '\\');
if (slash == NULL)
usedir = ".";
else if (slash == dir)
{
usedir = "\\";
}
else
{
*slash = '\0';