mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Revert "More racecondition elimination."
This reverts commit d846522e0e.
This commit is contained in:
parent
d846522e0e
commit
91c3114b78
1 changed files with 2 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ class FilesystemStorage(Storage):
|
||||||
raise exceptions.AlreadyExistingError(item.uid)
|
raise exceptions.AlreadyExistingError(item.uid)
|
||||||
with safe_write(fpath, 'wb+') as f:
|
with safe_write(fpath, 'wb+') as f:
|
||||||
f.write(item.raw.encode(self.encoding))
|
f.write(item.raw.encode(self.encoding))
|
||||||
return href, _get_etag(f.tmppath)
|
return href, _get_etag(fpath)
|
||||||
|
|
||||||
def update(self, href, item, etag):
|
def update(self, href, item, etag):
|
||||||
fpath = self._get_filepath(href)
|
fpath = self._get_filepath(href)
|
||||||
|
|
@ -134,7 +134,7 @@ class FilesystemStorage(Storage):
|
||||||
|
|
||||||
with safe_write(fpath, 'wb') as f:
|
with safe_write(fpath, 'wb') as f:
|
||||||
f.write(item.raw.encode(self.encoding))
|
f.write(item.raw.encode(self.encoding))
|
||||||
return _get_etag(f.tmppath)
|
return _get_etag(fpath)
|
||||||
|
|
||||||
def delete(self, href, etag):
|
def delete(self, href, etag):
|
||||||
fpath = self._get_filepath(href)
|
fpath = self._get_filepath(href)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue