fix relative paths for -d/--download cli on linux

This commit is contained in:
Christopher Roy Bratusek 2013-06-17 18:49:04 +02:00
parent a4714d8070
commit 3a7bf582ff
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-- 0.7.1 --
* update link to pycrypto installer for Windows in 'DEPS'
* only chdir on linux (fixes qwad not running on some Windows installation)
* fix relative paths for -d/--download cli on linux
-- 0.7 -- -- 0.7 --
* cli-options now can properly handle relative paths * cli-options now can properly handle relative paths
* --tmdinfo does now longer fail when checking an IOS * --tmdinfo does now longer fail when checking an IOS

View File

@ -60,6 +60,13 @@ def opts():
if options.download: if options.download:
if args[0] is "0": if args[0] is "0":
args[0] = None args[0] = None
if sys.platform.startswith('linux'):
if args[1].startswith('./'):
wadname = str(args[1][2:])
args[1] = os.getcwd() + '/' + wadname
elif not args[1].startswith('/'):
wadname = args[1]
args[1] = os.getcwd() + '/' + wadname
if "." in str(options.download[0]): if "." in str(options.download[0]):
dld = ChannelCLIDict[str(options.download[0][:-4])] dld = ChannelCLIDict[str(options.download[0][:-4])]
reg = str(options.download[0][-3:]) reg = str(options.download[0][-3:])