From d085111f1cfbb9d0594ffab8ba0dfaa2a86dcc0c Mon Sep 17 00:00:00 2001 From: Gareth Latty Date: Sun, 8 Jan 2012 23:57:18 +0000 Subject: [PATCH] v1.2 - Bugfix for windows and --mkdir. --- unrpa | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/unrpa b/unrpa index 1577052..34469cf 100755 --- a/unrpa +++ b/unrpa @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 ''' This program is free software: you can redistribute it and/or modify @@ -17,7 +17,11 @@ ### Copyright Gareth Latty 2009 -### Version 1.1 (Current) +### Version 1.2 (Current) +### BUGFIX: Presumed a forwards slash in the make_directory_structure function, +### Broke under windows when using --mkdir. + +### Version 1.1 ### BUGFIX: Crash upon listing files when in verbose mode. ### BUGFIX: A few extra bytes were appended to the end of every file. @@ -58,6 +62,9 @@ class UnRPA: for item, data in index.iteritems(): self.make_directory_structure(os.path.join(self.path, os.path.split(item)[0])) raw_file = self.extract_file(item, data) + print(self.path) + print(item) + print(os.path.join(self.path, item)) with open(os.path.join(self.path, item), "wb") as f: f.write(raw_file) @@ -90,7 +97,7 @@ class UnRPA: while os.path.basename(name): name, dirname = os.path.split(name) dirs.append(dirname) - current = "/" + current = os.sep dirs.reverse() for directory in dirs: current = os.path.join(current, directory)