plugin importfeeds: fix symlink creation when it already exists

This commit is contained in:
kraymer 2012-07-16 23:41:15 +02:00 committed by Fabrice Laporte
parent b20367dd41
commit e9104b6775

View file

@ -87,7 +87,9 @@ def _record_items(lib, basename, items):
if 'link' in _feeds_formats:
for path in paths:
os.symlink(path, os.path.join(_feeds_dir, os.path.basename(path)))
dest = os.path.join(_feeds_dir, os.path.basename(path))
if not os.path.exists(dest):
os.symlink(path, dest)
@ImportFeedsPlugin.listen('library_opened')
def library_opened(lib):