mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Catch errors of Windows API
This commit is contained in:
parent
2831e17ae1
commit
ba4407af13
1 changed files with 4 additions and 1 deletions
|
|
@ -105,7 +105,10 @@ class FilesystemStorage(Storage):
|
||||||
href = self._deterministic_href(item)
|
href = self._deterministic_href(item)
|
||||||
return self._upload_impl(item, href)
|
return self._upload_impl(item, href)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno == errno.ENAMETOOLONG:
|
if e.errno in (
|
||||||
|
errno.ENAMETOOLONG, # Unix
|
||||||
|
errno.ENOENT # Windows
|
||||||
|
):
|
||||||
logger.debug('UID as filename rejected, trying with random '
|
logger.debug('UID as filename rejected, trying with random '
|
||||||
'one.')
|
'one.')
|
||||||
href = self._random_href()
|
href = self._random_href()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue