python-adfs
changeset 35:272601d73ad6
Directories for output are not explicitly created in ADF2INF.py anymore.
All the work is done in the "create_directory" method of the ADFSdisc
class when files are being extracted. Care must be taken by the user to
avoid overwriting files as a result of this change.
| author | David Boddie <david@boddie.org.uk> |
|---|---|
| date | Sat Mar 29 23:41:02 2003 +0100 |
| parents | a35c87cd4282 |
| children | a6be29d7d937 |
| files | ADF2INF.py |
| diffstat | 1 files changed, 3 insertions(+), 21 deletions(-) [+] |
line diff
1.1 --- a/ADF2INF.py Sat Mar 29 23:19:32 2003 +0100 1.2 +++ b/ADF2INF.py Sat Mar 29 23:41:02 2003 +0100 1.3 @@ -145,34 +145,16 @@ 1.4 # Exit 1.5 sys.exit() 1.6 1.7 - # Attempt to create a directory using the output path in case the user 1.8 - # wants to put the disc inside a directory to be sure that the disc won't 1.9 - # overwrite files. 1.10 - 1.11 - try: 1.12 - os.mkdir(out_path) 1.13 - print 'Created directory: %s' % out_path 1.14 - except OSError: 1.15 - print "Couldn't create directory: %s" % out_path 1.16 - sys.exit() 1.17 1.18 # Make sure that the disc is put in a directory corresponding to the disc 1.19 # name where applicable. 1.20 1.21 if use_name != 0 and adfsdisc.disc_name != '$': 1.22 1.23 - new_path = adfsdisc.create_directory(out_path, adfsdisc.disc_name) 1.24 + new_path = os.path.join(out_path, adfsdisc.disc_name) 1.25 1.26 - if new_path != "": 1.27 - 1.28 - print 'Created directory: %s' % new_path 1.29 - 1.30 - # Place the output files on this new path. 1.31 - out_path = new_path 1.32 - 1.33 - else: 1.34 - 1.35 - print "Couldn't create directory: %s" % self.disc_name 1.36 + # Place the output files on this new path. 1.37 + out_path = new_path 1.38 1.39 # Extract the files 1.40 adfsdisc.extract_files(out_path, adfsdisc.files, filetypes, separator)
