diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-22 20:59:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-22 20:59:13 +0000 |
commit | 8152cea349f1bbd9fb060688fcb079e51bfb2eda (patch) | |
tree | 5f9695d9a517952c5675911084250618c07da84e | |
parent | 9cb81b60ce66e6ca59f0b8bc465982696c670095 (diff) | |
download | gnunet-8152cea349f1bbd9fb060688fcb079e51bfb2eda.tar.gz gnunet-8152cea349f1bbd9fb060688fcb079e51bfb2eda.zip |
fix
-rw-r--r-- | src/util/disk.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/util/disk.c b/src/util/disk.c index b7365648d..0b37da8c2 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -1888,9 +1888,8 @@ GNUNET_DISK_npipe_open (const char *fn, | |||
1888 | enum GNUNET_DISK_OpenFlags flags, | 1888 | enum GNUNET_DISK_OpenFlags flags, |
1889 | enum GNUNET_DISK_AccessPermissions perm) | 1889 | enum GNUNET_DISK_AccessPermissions perm) |
1890 | { | 1890 | { |
1891 | struct GNUNET_DISK_FileHandle *ret; | ||
1892 | |||
1893 | #ifdef MINGW | 1891 | #ifdef MINGW |
1892 | struct GNUNET_DISK_FileHandle *ret; | ||
1894 | HANDLE h; | 1893 | HANDLE h; |
1895 | DWORD openMode; | 1894 | DWORD openMode; |
1896 | char *name; | 1895 | char *name; |
@@ -1921,11 +1920,10 @@ GNUNET_DISK_npipe_open (const char *fn, | |||
1921 | 1920 | ||
1922 | return ret; | 1921 | return ret; |
1923 | #else | 1922 | #else |
1924 | int fd; | ||
1925 | |||
1926 | if (mkfifo(fn, translate_unix_perms(perm)) == -1) | 1923 | if (mkfifo(fn, translate_unix_perms(perm)) == -1) |
1927 | { | 1924 | { |
1928 | if (errno == EEXIST && flags & GNUNET_DISK_OPEN_FAILIFEXISTS) | 1925 | if ( (errno != EEXIST) || |
1926 | (0 != (flags & GNUNET_DISK_OPEN_FAILIFEXISTS)) ) | ||
1929 | return NULL; | 1927 | return NULL; |
1930 | } | 1928 | } |
1931 | 1929 | ||