diff options
author | Marco Peereboom <marco@conformal.com> | 2012-07-13 11:02:41 -0500 |
---|---|---|
committer | Marco Peereboom <marco@conformal.com> | 2012-07-13 11:03:02 -0500 |
commit | 45aad0702f99094e27b5aa197fd86f0fd48bce2d (patch) | |
tree | 9f8fcfc11315e398f3f6af44307c44403d2118a4 | |
parent | 8fbf6416848cd3cf74b9338ce4fa820146279c31 (diff) | |
download | xombrero-45aad0702f99094e27b5aa197fd86f0fd48bce2d.tar.gz |
rejig downloads a bit to accomodate windows
-rw-r--r-- | xombrero.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xombrero.c b/xombrero.c index 754f9d4..c18715d 100644 --- a/xombrero.c +++ b/xombrero.c @@ -8183,7 +8183,6 @@ xxx_dir(char *dir) if (stat(dir, &sb)) { #if defined __MINGW32__ -printf("making: %s\n", dir); if (mkdir(dir) == -1) #else if (mkdir(dir, S_IRWXU) == -1) @@ -8245,6 +8244,7 @@ complain: if (mtx_complain == 0) { DNPRINTF(XT_D_MTX, "buggy mutex implementation detected(%s), " "work around implemented", s); + s = s; /* *sigh* gcc */ mtx_complain = 1; } } @@ -8269,6 +8269,7 @@ complain: if (mtx_complain == 0) { DNPRINTF(XT_D_MTX, "buggy mutex implementation detected(%s), " "work around implemented", s); + s = s; /* *sigh* gcc */ mtx_complain = 1; } } @@ -8431,11 +8432,13 @@ main(int argc, char **argv) xtp_generate_keys(); - /* set download dir */ pwd = getpwuid(getuid()); if (pwd == NULL) errx(1, "invalid user %d", getuid()); - strlcpy(download_dir, pwd->pw_dir, sizeof download_dir); + + /* set download dir */ + if (strlen(download_dir) == 0) + strlcpy(download_dir, pwd->pw_dir, sizeof download_dir); /* compile buffer command regexes */ buffercmd_init(); |