no need to rename on a case insensitive filename

This commit is contained in:
Damien Elmes 2008-12-20 16:26:51 +09:00
parent 499b6b76fc
commit a6f7276b03

View file

@ -60,7 +60,7 @@ Update media table. If file already exists, don't copy."""
if not os.path.exists(new): if not os.path.exists(new):
if new.lower() == path.lower(): if new.lower() == path.lower():
# case insensitive filesystems suck # case insensitive filesystems suck
os.rename(path, new.encode(sys.getfilesystemencoding())) pass
else: else:
shutil.copy2(path, new.encode(sys.getfilesystemencoding())) shutil.copy2(path, new.encode(sys.getfilesystemencoding()))
newSize = os.stat(new)[stat.ST_SIZE] newSize = os.stat(new)[stat.ST_SIZE]