Skip to contentSkip to conversation

Fix deleting series trash directory

PATCH New Roland Dreier 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix deleting series trash directory

When deleting a series, the loop that iterates through the files in __trash_dir needs to add __trash_dir to the filename that it passes to os.remove().

---

stgit/stack.py +1 -1
index b0a01dd..4e5ddb3 100644
@@ -665,7 +665,7 @@ class Series(StgitObject):
 
             # remove the trash directory
             for fname in os.listdir(self.__trash_dir):
-                os.remove(fname)
+                os.remove(os.path.join(self.__trash_dir, fname))
             os.rmdir(self.__trash_dir)
 
             # FIXME: find a way to get rid of those manual removals