Skip to content

Commit

Permalink
[MovieSelection] avoid possible timing issue when deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
Huevos committed Nov 8, 2024
1 parent a476ffd commit ea771d3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/python/Screens/MovieSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2417,8 +2417,13 @@ def __permanentDeleteListConfirmed(self, delList, confirmed):

if deletedList:
path2 = path + ".del"
if offline is None and os.path.isdir(path2): # directory not deleted by eraser and .del added to path name
shutil.rmtree(path2)
if offline is None: # directory not deleted by eraser and .del added to path name
# print("[MovieSelection][permanentDeleteListConfirmed] shutil path", path2)
try:
shutil.rmtree(path2)
except FileNotFoundError:
pass

self["list"].removeServices(deletedList)
deletedCount = len(deletedList)
self.showActionFeedback(_("Deleted '%s'") % name if deletedCount == 1 else _("Deleted %d items") % deletedCount)
Expand Down

0 comments on commit ea771d3

Please sign in to comment.