wmllint, wmlscope and wmlindent: fixed bug caused by Windows' command prompt appending double quotes to arguments
This is a backport of Elvish Hunter's 2013-02-23T13:04:12Z fix to 1.11.
This commit is contained in:
parent
d51c4b870b
commit
12295c9e90
4 changed files with 19 additions and 0 deletions
|
@ -14,6 +14,8 @@ Version 1.4.7+svn:
|
|||
* Fixed bug #12896: Map generator does not sync between clients when
|
||||
advancing in MP campaigns
|
||||
* Removed support for PythonAI to handle CVE-2009-0367
|
||||
* Fixed wmllint, wmlscope and wmlindent not working correctly on Windows if a
|
||||
command line argument ends with a backslash
|
||||
|
||||
Version 1.4.7:
|
||||
* campaigns:
|
||||
|
|
|
@ -241,5 +241,10 @@ if __name__ == '__main__':
|
|||
exclude.append(val)
|
||||
elif opt in ('-v', '--verbose'):
|
||||
verbose += 1
|
||||
# in certain situations, Windows' command prompt appends a double quote
|
||||
# to the command line parameters. This block takes care of this issue.
|
||||
for i,arg in enumerate(arguments):
|
||||
if arg.endswith('"'):
|
||||
arguments[i] = arg[:-1]
|
||||
convertor(lambda n, f1, f2: reindent(n, f1, f2),
|
||||
arguments, "|".join(exclude))
|
||||
|
|
|
@ -2078,6 +2078,12 @@ if __name__ == '__main__':
|
|||
if not arguments:
|
||||
arguments = ["."]
|
||||
|
||||
# in certain situations, Windows' command prompt appends a double quote
|
||||
# to the command line parameters. This block takes care of this issue.
|
||||
for i,arg in enumerate(arguments):
|
||||
if arg.endswith('"'):
|
||||
arguments[i] = arg[:-1]
|
||||
|
||||
for dir in arguments:
|
||||
ofp = None
|
||||
if "older" in versions:
|
||||
|
|
|
@ -351,6 +351,12 @@ Usage: macroscope [options] dirpath
|
|||
elif switch in ('-w', '--warnlevel'):
|
||||
warnlevel = int(val)
|
||||
|
||||
# in certain situations, Windows' command prompt appends a double quote
|
||||
# to the command line parameters. This block takes care of this issue.
|
||||
for i,arg in enumerate(arguments):
|
||||
if arg.endswith('"'):
|
||||
arguments[i] = arg[:-1]
|
||||
|
||||
forceused = "|".join(forceused)
|
||||
if len(arguments):
|
||||
dirpath = arguments
|
||||
|
|
Loading…
Add table
Reference in a new issue