summaryrefslogtreecommitdiffstats
path: root/src/dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2010-08-23 16:01:55 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2010-08-23 16:01:55 +0200
commit90f2b63eac56a8c5dfb8d6471f817b3f9c9ecdc0 (patch)
tree5397292a9a47fd7eba91c3913f4fd396e0dccecc /src/dir.c
parent643d625772c17a9467512f050b95e81b83b8594c (diff)
Code cleanup
Diffstat (limited to 'src/dir.c')
-rw-r--r--src/dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dir.c b/src/dir.c
index cbbef9d..c17d8eb 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -613,7 +613,6 @@ char *mkdir_local(const char *localroot, const char *pathname)
while(*src!='\0')
{
unsigned int n=0;
- unsigned int l;
const char *src_org=src;
char *dst_org=dst;
for(n=0;
@@ -624,6 +623,7 @@ char *mkdir_local(const char *localroot, const char *pathname)
#ifdef __MINGW32__
if(mkdir(localdir)<0 && errno==EINVAL)
{
+ unsigned int l;
l=filename_convert(dst_org, src_org, n);
dst=dst_org+l;
mkdir(localdir);
@@ -632,6 +632,7 @@ char *mkdir_local(const char *localroot, const char *pathname)
if(memcmp(&localdir[1],":/cygdrive",11)!=0 &&
mkdir(localdir, 0775)<0 && errno==EINVAL)
{
+ unsigned int l;
l=filename_convert(dst_org, src_org, n);
dst=dst_org+l;
mkdir(localdir, 0775);
@@ -639,6 +640,7 @@ char *mkdir_local(const char *localroot, const char *pathname)
#else
if(mkdir(localdir, 0775)<0 && errno==EINVAL)
{
+ unsigned int l;
l=filename_convert(dst_org, src_org, n);
dst=dst_org+l;
mkdir(localdir, 0775);