[PATCH StGIT] Fix deleting series trash directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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().

Signed-off-by: Roland Dreier <rolandd@xxxxxxxxx>
---
diff --git a/stgit/stack.py b/stgit/stack.py
index b0a01dd..4e5ddb3 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]