prevent stripping whitespace from end of regex patterns

This commit is contained in:
Alan Hamlett 2017-02-02 11:47:06 -08:00
parent 7f198639aa
commit 9938a67dc9

View file

@ -243,10 +243,10 @@ def parseArguments():
else: else:
args.hidefilenames = [] args.hidefilenames = []
if configs.has_option('settings', 'hidefilenames'): if configs.has_option('settings', 'hidefilenames'):
option = configs.get('settings', 'hidefilenames').strip() option = configs.get('settings', 'hidefilenames')
if option.lower() == 'true': if option.strip().lower() == 'true':
args.hidefilenames = ['.*'] args.hidefilenames = ['.*']
elif option.lower() != 'false': elif option.strip().lower() != 'false':
try: try:
for pattern in option.split("\n"): for pattern in option.split("\n"):
if pattern.strip() != '': if pattern.strip() != '':