2003-08-30 Casper S. Hornstrup <chorns@users.sourceforge.net>

* tools/rmkdir.c: Fix for absolute paths.

svn path=/trunk/; revision=5930
This commit is contained in:
Casper Hornstrup 2003-08-30 00:59:11 +00:00
parent b6a3594f0e
commit 2566f13f3e
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2003-08-30 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rmkdir.c: Fix for absolute paths.
2003-08-30 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/rmkdir.c: Create all (sub)directories in path on win32.

View file

@ -77,6 +77,7 @@ int main(int argc, char* argv[])
FILE* out;
char* csec;
int is_abs_path;
char buf[256];
if (argc != 2)
{
@ -89,7 +90,8 @@ int main(int argc, char* argv[])
if (isalpha(path1[0]) && path1[1] == ':' && path1[2] == DIR_SEPARATOR_CHAR)
{
csec = strtok(path1, DIR_SEPARATOR_STRING);
chdir(csec);
sprintf(buf, "%s\\", csec);
chdir(buf);
csec = strtok(NULL, DIR_SEPARATOR_STRING);
}
else if (path1[0] == DIR_SEPARATOR_CHAR)