mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 09:48:56 +00:00
fix behavior of fake fileops test-helper
This commit is contained in:
parent
2fd2a9b2c7
commit
fcfcbaa6a2
@ -411,6 +411,9 @@ class FileOperationsHelper(object):
|
||||
|
||||
def write(self, path_u, contents):
|
||||
fname = path_u
|
||||
if not os.path.exists(fname):
|
||||
self._maybe_notify(fname, self._inotify.IN_CREATE)
|
||||
|
||||
d = self._uploader.set_hook('inotify')
|
||||
with open(fname, "wb") as f:
|
||||
f.write(contents)
|
||||
@ -435,7 +438,7 @@ class FileOperationsHelper(object):
|
||||
|
||||
def _maybe_notify(self, fname, mask):
|
||||
if self._fake_inotify:
|
||||
self._uploader._notifier.event(to_filepath(fname), self._inotify.IN_DELETE)
|
||||
self._uploader._notifier.event(to_filepath(fname), mask)
|
||||
|
||||
|
||||
class CheckerMixin(object):
|
||||
|
Loading…
Reference in New Issue
Block a user