[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8855 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8855 - gnunet/src/util |
Date: |
Tue, 25 Aug 2009 14:49:20 -0600 |
Author: durner
Date: 2009-08-25 14:49:20 -0600 (Tue, 25 Aug 2009)
New Revision: 8855
Modified:
gnunet/src/util/disk.c
Log:
fix file open flag mapping on Windows
Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c 2009-08-25 19:49:51 UTC (rev 8854)
+++ gnunet/src/util/disk.c 2009-08-25 20:49:20 UTC (rev 8855)
@@ -1100,11 +1100,24 @@
access = FILE_WRITE_DATA;
if (flags & GNUNET_DISK_OPEN_FAILIFEXISTS)
- disp = CREATE_NEW;
- if (flags & GNUNET_DISK_OPEN_TRUNCATE)
- disp = TRUNCATE_EXISTING;
- if (flags & GNUNET_DISK_OPEN_CREATE)
- disp |= OPEN_ALWAYS;
+ {
+ disp = CREATE_NEW;
+ }
+ else if (flags & GNUNET_DISK_OPEN_CREATE)
+ {
+ if (flags & GNUNET_DISK_OPEN_TRUNCATE)
+ disp = CREATE_ALWAYS;
+ else
+ disp = OPEN_ALWAYS;
+ }
+ else if (flags & GNUNET_DISK_OPEN_TRUNCATE)
+ {
+ disp = TRUNCATE_EXISTING;
+ }
+ else
+ {
+ disp = OPEN_ALWAYS;
+ }
/* TODO: access priviledges? */
h = CreateFile (expfn, access, FILE_SHARE_DELETE | FILE_SHARE_READ
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8855 - gnunet/src/util,
gnunet <=