diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-02-01 14:21:47 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-02-01 14:21:47 +0100 |
commit | 76aeabaf42e77b28a4e55559e551a622729bc9b3 (patch) | |
tree | 7142308944527947dde441a97448bf7e1d478c83 | |
parent | 2148983e7d7a936283dbbce0f282aa8676603689 (diff) | |
download | obnam-76aeabaf42e77b28a4e55559e551a622729bc9b3.tar.gz |
Fix pre-1970 timestamps for FUSE
Patch-by: Valery Yundin
-rw-r--r-- | obnamlib/plugins/fuse_plugin.py | 5 | ||||
-rw-r--r-- | test-gpghome/random_seed | bin | 600 -> 600 bytes |
2 files changed, 5 insertions, 0 deletions
diff --git a/obnamlib/plugins/fuse_plugin.py b/obnamlib/plugins/fuse_plugin.py index b2048c83..26e342b2 100644 --- a/obnamlib/plugins/fuse_plugin.py +++ b/obnamlib/plugins/fuse_plugin.py @@ -240,6 +240,11 @@ class ObnamFuse(fuse.Fuse): self.metadatacache.clear() metadata = self.obnam.repo.get_metadata(*self.get_gen_path(path)) self.metadatacache[path] = metadata + # FUSE does not allow negative timestamps, truncate to zero + if metadata.st_atime_sec < 0: + metadata.st_atime_sec = 0 + if metadata.st_mtime_sec < 0: + metadata.st_mtime_sec = 0 return metadata def get_stat(self, path): diff --git a/test-gpghome/random_seed b/test-gpghome/random_seed Binary files differindex 260a2936..f74c2537 100644 --- a/test-gpghome/random_seed +++ b/test-gpghome/random_seed |