From 91c3114b7806271ffe808ff24cf5526f0384c832 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 10 Apr 2014 13:36:02 +0200 Subject: [PATCH] Revert "More racecondition elimination." This reverts commit d846522e0e8f214c29135e7d5459977d9e3c6b49. --- vdirsyncer/storage/filesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index 581e068..bac7fda 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -119,7 +119,7 @@ class FilesystemStorage(Storage): raise exceptions.AlreadyExistingError(item.uid) with safe_write(fpath, 'wb+') as f: f.write(item.raw.encode(self.encoding)) - return href, _get_etag(f.tmppath) + return href, _get_etag(fpath) def update(self, href, item, etag): fpath = self._get_filepath(href) @@ -134,7 +134,7 @@ class FilesystemStorage(Storage): with safe_write(fpath, 'wb') as f: f.write(item.raw.encode(self.encoding)) - return _get_etag(f.tmppath) + return _get_etag(fpath) def delete(self, href, etag): fpath = self._get_filepath(href)