git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH StGIT] Fix deleting series trash directory

From
RDRoland Dreier <rdreier@cisco.com>
Date
May 3, 2007, 18:29 UTC
Message-ID
<adalkg5ep62.fsf@cisco.com>

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@cisco.com>
---
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
Message 1 of 1 in “Fix deleting series trash directory”
  1. Fix deleting series trash directoryRoland Dreier, May 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.