diff options
author | Simon Schampijer <simon@schampijer.de> | 2011-09-29 16:01:34 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2011-09-29 16:01:34 (GMT) |
commit | 37703a7a102c4b62756c6477d0a22621dfb04a95 (patch) | |
tree | e286f6589d73692b237369e76152857d1da32331 | |
parent | 58ca1e21c3ad93151a9e3450d69d4a6c62c479be (diff) |
Revert "Make sure data store checkouts are read-only"
This reverts commit a7644fcca13db182cd44378ac1402f17c023e601.
This had implications for SL #3135. Revert for now, an updated
fix can go in a stable update.
-rw-r--r-- | src/carquinyol/filestore.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/carquinyol/filestore.py b/src/carquinyol/filestore.py index 0b34b69..7094310 100644 --- a/src/carquinyol/filestore.py +++ b/src/carquinyol/filestore.py @@ -133,6 +133,14 @@ class FileStore(object): else: raise + # Try to make the original file readable. This can fail if the file is + # in a FAT filesystem. + try: + os.chmod(file_path, 0604) + except OSError, e: + if e.errno != errno.EPERM: + raise + return destination_path def get_file_path(self, uid): @@ -218,7 +226,7 @@ class AsyncCopy(object): self.src_fp = os.open(self.src, os.O_RDONLY) self.dest_fp = os.open(self.dest, os.O_RDWR | os.O_TRUNC | os.O_CREAT, - 0444) + 0644) stat = os.fstat(self.src_fp) self.size = stat[6] |