diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-04-21 12:49:52 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-04-21 12:49:52 +0100 |
commit | e1f4260d94c7f5cd9666924255a23f7c53da7b6d (patch) | |
tree | b4020e6cd8d9628c26f0a685bc29bc27d650775a | |
parent | 7bf3a75901c3c3d3574df32a934bd8df58a32493 (diff) | |
download | larch-e1f4260d94c7f5cd9666924255a23f7c53da7b6d.tar.gz |
Fix file exists checking for read-only mode
-rw-r--r-- | larch/journal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/larch/journal.py b/larch/journal.py index b6b7eb9..6bdf2f7 100644 --- a/larch/journal.py +++ b/larch/journal.py @@ -104,7 +104,7 @@ class Journal(object): def exists(self, filename): return (self.fs.exists(filename) or - self.fs.exists(self._new(filename))) + (self.allow_writes and self.fs.exists(self._new(filename)))) def makedirs(self, dirname): tracing.trace(dirname) |