mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 09:43:48 +02:00
Pull from trunk
This commit is contained in:
commit
3c4e3beb63
1 changed files with 5 additions and 0 deletions
|
|
@ -456,6 +456,10 @@ def set_path(self, index, index_is_id=False):
|
|||
parent = os.path.dirname(spath)
|
||||
if len(os.listdir(parent)) == 0:
|
||||
self.rmtree(parent, permanent=True)
|
||||
'''
|
||||
This is commented out as it can lead to book file loss if the second
|
||||
rename fails. This makes it not worthwhile, IMO.
|
||||
|
||||
curpath = self.library_path
|
||||
c1, c2 = current_path.split('/'), path.split('/')
|
||||
if not self.is_case_sensitive and len(c1) == len(c2):
|
||||
|
|
@ -487,6 +491,7 @@ def set_path(self, index, index_is_id=False):
|
|||
else:
|
||||
os.rename(tempname, os.path.join(curpath, newseg))
|
||||
curpath = os.path.join(curpath, newseg)
|
||||
'''
|
||||
|
||||
def add_listener(self, listener):
|
||||
'''
|
||||
|
|
|
|||
Loading…
Reference in a new issue