fixed windows behaviour. Rewrite fle mode from "a+" to "rw+"
1.1 --- a/config/OsecFS.cfg Tue Feb 18 15:37:10 2014 +0100
1.2 +++ b/config/OsecFS.cfg Thu Mar 27 14:04:48 2014 +0100
1.3 @@ -9,16 +9,19 @@
1.4 Rootpath: /tmp/root_fuse
1.5
1.6
1.7 +
1.8 +
1.9 # path to scanner class
1.10 -ScannerPath: /path/to/ikarusscanner/src/
1.11 +#ScannerPath: /path/to/ikarusscanner/src/
1.12 +ScannerPath: /home/spawn/workspace_python/ikarusscanner/src/
1.13
1.14 # scanner module name
1.15 ScannerModuleName: IkarusScanner
1.16 ScannerClassName: IkarusScanner
1.17
1.18 # config file for scanner (path will be in the constructor)
1.19 -ScannerConfig: /path/to/IkarusScanner.cfg
1.20 -
1.21 +#ScannerConfig: /path/to/IkarusScanner.cfg
1.22 +ScannerConfig: /home/spawn/workspace_python/ikarusscanner/config/IkarusScanner.cfg
1.23
1.24
1.25
2.1 --- a/src/OsecFS.py Tue Feb 18 15:37:10 2014 +0100
2.2 +++ b/src/OsecFS.py Thu Mar 27 14:04:48 2014 +0100
2.3 @@ -329,7 +329,7 @@
2.4 if (config.get("Main", "ReadOnly") == "true"):
2.5 sendReadOnlyNotification()
2.6 return -errno.EACCES
2.7 - f = open (fixPath (path), "a")
2.8 + f = open (fixPath (path), "rw+")
2.9 f.truncate (length)
2.10 f.close ()
2.11
2.12 @@ -364,7 +364,9 @@
2.13 if (config.get("Main", "ReadOnly") == "true"):
2.14 sendReadOnlyNotification()
2.15 return -errno.EACCES
2.16 - self.file = os.fdopen (os.open (fixPath (path), flags, mode), flag2mode (flags))
2.17 + #self.file = os.fdopen (os.open (fixPath (path), flags, mode), flag2mode (flags))
2.18 + # fix strange Windows behaviour
2.19 + self.file = os.fdopen (os.open (fixPath (path), flags, mode), "rw+")
2.20 self.fd = self.file.fileno ()
2.21
2.22