mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 00:02:38 +00:00
IMP: when using -fs maintenance method, will now use original parent folder location instead of assuming it is the Comic Location path specififed in the configuration
This commit is contained in:
parent
ef6e7d67a4
commit
a6aa29aaf7
1 changed files with 3 additions and 2 deletions
|
@ -90,10 +90,11 @@ class Maintenance(object):
|
|||
for ct in self.dbmylar.execute("SELECT ComicID, ComicLocation FROM comics WHERE ComicLocation like ?", ['%' + os.sep.encode('unicode-escape') + os.sep.encode('unicode-escape') + '%']):
|
||||
st = ct[1].find(os.sep.encode('unicode-escape')+os.sep.encode('unicode-escape'))
|
||||
if st != -1:
|
||||
rootloc = ct[1][:st]
|
||||
clocation = ct[1][st+2:]
|
||||
if clocation[0] != os.sep.encode('unicode-escape'):
|
||||
new_path = os.path.join(mylar.CONFIG.DESTINATION_DIR, clocation)
|
||||
logger.info('[Incorrect slashes in path detected for OS] %s' % os.path.join(mylar.CONFIG.DESTINATION_DIR, ct[1]))
|
||||
new_path = os.path.join(rootloc, clocation)
|
||||
logger.info('[Incorrect slashes in path detected for OS] %s' % os.path.join(rootloc, ct[1]))
|
||||
logger.info('[PATH CORRECTION] %s' % new_path)
|
||||
self.comiclist.append({'ComicLocation': new_path,
|
||||
'ComicID': ct[0]})
|
||||
|
|
Loading…
Reference in a new issue