[mod] negative index are more readable

This commit is contained in:
Laurent Peuch 2019-07-07 03:23:52 +02:00
parent d57fdf695d
commit 506aaf7472

View file

@ -1975,7 +1975,7 @@ def _extract_app_from_file(path, remove=False):
os.remove(path) os.remove(path)
elif os.path.isdir(path): elif os.path.isdir(path):
shutil.rmtree(APP_TMP_FOLDER) shutil.rmtree(APP_TMP_FOLDER)
if path[len(path) - 1:] != '/': if path[-1] != '/':
path = path + '/' path = path + '/'
extract_result = os.system('cp -a "%s" %s' % (path, APP_TMP_FOLDER)) extract_result = os.system('cp -a "%s" %s' % (path, APP_TMP_FOLDER))
else: else: