foxygit / doom Log in
commit 48f39f1ee566051d8084827fd31b8cd99c8570d6
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Jun 21 19:03:38 2009 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sun Jun 21 19:03:38 2009 +0000

    Remove temporary files after generating CAB file.

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 1605
---
 pkg/wince/wince-cabgen | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pkg/wince/wince-cabgen b/pkg/wince/wince-cabgen
index 2b901f87..e8820d8c 100755
--- a/pkg/wince/wince-cabgen
+++ b/pkg/wince/wince-cabgen
@@ -610,6 +610,12 @@ class CabFile:

         os.spawnlp(os.P_WAIT, "lcab", *args)

+        # Clean up:
+
+        for tmpfile in header + files:
+            os.remove(tmpfile)
+        os.rmdir(temp_dir)
+
 def expand_path(filename):

     # Replace Unix-style / path separators with DOS-style \