Don't shadow built-in "dir"

This commit is contained in:
Daniel Schadt 2015-11-11 21:20:04 +01:00
parent 62b0c4d178
commit 18da73227b

View File

@ -514,8 +514,8 @@ def start_download_checked(dest, win_id, tab_id):
# Yes, this is prone to race conditions, but we're checking again before
# saving the file anyway.
if not os.path.isdir(os.path.dirname(path)):
dir = os.path.dirname(path)
message.error(win_id, "Directory {} does not exist.".format(dir))
folder = os.path.dirname(path)
message.error(win_id, "Directory {} does not exist.".format(folder))
return
if not os.path.isfile(path):