mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
ignore empty folders but don't delete. Fixes #532
This commit is contained in:
parent
d7cfec90e7
commit
2a178a80aa
1 changed files with 2 additions and 2 deletions
|
@ -568,13 +568,13 @@ def getDirs(section, subsection, link = 'hard'):
|
|||
except Exception as e:
|
||||
logger.error("Failed to move %s to its own directory: %s" % (os.path.split(mediafile)[1], e))
|
||||
|
||||
removeEmptyFolders(path, removeRoot=False)
|
||||
#removeEmptyFolders(path, removeRoot=False)
|
||||
|
||||
if os.listdir(path):
|
||||
for dir in [os.path.join(path, o) for o in os.listdir(path) if
|
||||
os.path.isdir(os.path.join(path, o))]:
|
||||
sync = [ o for o in os.listdir(dir) if os.path.splitext(o)[1] == '.!sync' ]
|
||||
if len(sync) > 0:
|
||||
if len(sync) > 0 or len(os.listdir(dir)) == 0:
|
||||
continue
|
||||
folders.extend([dir])
|
||||
return folders
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue