From 0fd07ec9de63dd721f826e9155925316bfcda952 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 10 Mar 2014 18:29:09 +0100 Subject: [PATCH] Loosen up validation for vdirs Otherwise we would have breakage for vdirs where the href is not uid + fileext (which is the case with old watdo versions) --- vdirsyncer/storage/filesystem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index 913925c..57834cd 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -11,6 +11,8 @@ import os from vdirsyncer.storage.base import Storage, Item import vdirsyncer.exceptions as exceptions from vdirsyncer.utils import expand_path +import vdirsyncer.log as log +logger = log.get('storage.filesystem') class FilesystemStorage(Storage): @@ -65,7 +67,8 @@ class FilesystemStorage(Storage): def update(self, href, obj, etag): fpath = self._get_filepath(href) if href != self._get_href(obj.uid): - raise exceptions.NotFoundError(obj.uid) + logger.warning('href != uid + fileext: href={}; uid={}' + .format(href, obj.uid)) if not os.path.exists(fpath): raise exceptions.NotFoundError(obj.uid) actual_etag = os.path.getmtime(fpath)