Copy file and maybe copy stats. fix #349

This commit is contained in:
Ruud committed 2013-09-02 16:49:57 +02:00
1 parent 3e28cd5c95
commit bc77812488
2 files changed
+11 -1

No files matched your search

@@ -48,6 +48,11 @@ class MetaDataBase(Plugin):
log.debug('Creating %s file: %s', (file_type, name))
if os.path.isfile(content):
shutil.copy2(content, name)
shutil.copyfile(content, name)
# Try and copy stats seperately
try: shutil.copystat(content, name)
except: pass
else:
self.createFile(name, content)
group['renamed_files'].append(name)