1.1 --- a/src/OsecFS.py Tue Feb 18 15:37:10 2014 +0100
1.2 +++ b/src/OsecFS.py Thu Mar 27 14:04:48 2014 +0100
1.3 @@ -329,7 +329,7 @@
1.4 if (config.get("Main", "ReadOnly") == "true"):
1.5 sendReadOnlyNotification()
1.6 return -errno.EACCES
1.7 - f = open (fixPath (path), "a")
1.8 + f = open (fixPath (path), "rw+")
1.9 f.truncate (length)
1.10 f.close ()
1.11
1.12 @@ -364,7 +364,9 @@
1.13 if (config.get("Main", "ReadOnly") == "true"):
1.14 sendReadOnlyNotification()
1.15 return -errno.EACCES
1.16 - self.file = os.fdopen (os.open (fixPath (path), flags, mode), flag2mode (flags))
1.17 + #self.file = os.fdopen (os.open (fixPath (path), flags, mode), flag2mode (flags))
1.18 + # fix strange Windows behaviour
1.19 + self.file = os.fdopen (os.open (fixPath (path), flags, mode), "rw+")
1.20 self.fd = self.file.fileno ()
1.21
1.22