mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
d171a3cc5d
commit
0b9937d41d
@ -951,7 +951,8 @@ class DB(object):
|
||||
if samefile(dest, path):
|
||||
# Ensure that the file has the same case as dest
|
||||
try:
|
||||
os.rename(path, dest)
|
||||
if path != dest:
|
||||
os.rename(path, dest)
|
||||
except:
|
||||
pass # Nothing too catastrophic happened, the cases mismatch, that's all
|
||||
else:
|
||||
@ -964,7 +965,7 @@ class DB(object):
|
||||
dest.flush()
|
||||
elif dest:
|
||||
if samefile(dest, path):
|
||||
if not self.is_case_sensitive:
|
||||
if not self.is_case_sensitive and path != dest:
|
||||
# Ensure that the file has the same case as dest
|
||||
try:
|
||||
os.rename(path, dest)
|
||||
|
@ -1347,7 +1347,8 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
||||
if samefile(path, dest):
|
||||
# Ensure that the file has the same case as dest
|
||||
try:
|
||||
os.rename(path, dest)
|
||||
if path != dest:
|
||||
os.rename(path, dest)
|
||||
except:
|
||||
pass # Nothing too catastrophic happened, the cases mismatch, that's all
|
||||
else:
|
||||
@ -1360,7 +1361,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
||||
dest.flush()
|
||||
elif dest:
|
||||
if samefile(dest, path):
|
||||
if not self.is_case_sensitive:
|
||||
if not self.is_case_sensitive and path != dest:
|
||||
# Ensure that the file has the same case as dest
|
||||
try:
|
||||
os.rename(path, dest)
|
||||
|
Loading…
x
Reference in New Issue
Block a user