Fix WindowsError or alike when deleting video nodes
This commit is contained in:
parent
b532b74b84
commit
209cd78315
1 changed files with 4 additions and 4 deletions
|
@ -68,9 +68,9 @@ class VideoNodes(object):
|
|||
"special://profile/library/video/Plex-%s/" % dirname)
|
||||
|
||||
if delete:
|
||||
files = [f for f in listdir(nodepath) if isfile(join(nodepath, f))]
|
||||
for file in files:
|
||||
remove(nodepath + file)
|
||||
if exists_dir(nodepath):
|
||||
from shutil import rmtree
|
||||
rmtree(nodepath)
|
||||
log.info("Sucessfully removed videonode: %s." % tagname)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue