Commit ae313c93 authored by rdubner's avatar rdubner

Fix -save-temps=/folder, Issue #42

parent eda34b78
......@@ -519,12 +519,13 @@ def Main() :
index=0
for param in params :
#print("param",param)
index += 1
if param and param[0] != '-' :
keepers.append(param)
## We know there is a dash...
paramw = param[1:]
## If there is an equals sign, then we remove everything past it
paramw1 = paramw.split('=')[0]
if paramw and paramw[0] == '-' :
## There were two!
paramw = paramw[1:]
......@@ -543,7 +544,7 @@ def Main() :
DASH_V = param
COMMANDS_REMOVED.append(param)
continue
if paramw in ("sa","sav","save","save-","save-t","save-te","save-tem","save-temp","save-temps") :
if paramw1 in ("sa","sav","save","save-","save-t","save-te","save-tem","save-temp","save-temps") :
# If he asked for -save-temps, we have to suppress the COBC processing of it
# We'll take care of it at the end.
SAVE_TEMPS=param
......@@ -988,7 +989,12 @@ def Main() :
if extension in ("c","i","s","o","h") :
d = dest + '/' + file.split('/')[-1]
DeleteAFile(d)
shutil.move(file,dest)
try :
shutil.move(file,dest)
except:
## This can happen when a file doesn't exist.
## to_be_deleted can have .i
pass
if cleaning_up :
for file in keepers :
......
......@@ -7,7 +7,7 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
::## Don't mess with it! #
::###########################################################################
::
set VERSION=[Version 4.13]
set VERSION=[Version 4.14]
::
::
:: Stupendously useful:
......
......@@ -4,4 +4,4 @@
// On the Unix side, there is scripting trickery to propogate this version
// code into cobcd.py and the names of packages when they are created.
#define VERSION "4.13"
#define VERSION "4.14"
......@@ -2473,7 +2473,7 @@ class CPrint (gdb.Command) :
self.TabFile = TabFileInformation();
self.TabFile.question_mark_range = self.Worker.question_mark_range
print('Registering CPrint (Usage is "' + self.Worker.use_cprint + ' <COBOL identifier>") [Version 4.13]')
print('Registering CPrint (Usage is "' + self.Worker.use_cprint + ' <COBOL identifier>") [Version 4.14]')
super (CPrint, self).__init__ (self.Worker.use_cprint, gdb.COMMAND_USER)
def invoke (self, arguments, from_tty):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment