diff --git a/application.py b/application.py index 70ea103..499bc4d 100755 --- a/application.py +++ b/application.py @@ -738,13 +738,13 @@ class Application(object): self.win.addnstr(self.y-1, 0, util.pad('', l), l) def open_aes_file(path, nl, name=None): - if os.path.isfile(path): + if os.path.isfile(path) or not os.path.exists(path): p = getpass.getpass("Please enter the AES password: ") return buffer2.AesBuffer(path, p, nl, name) else: raise Exception, "can't open %r; unsupported file type" % path def open_plain_file(path, nl, name=None): - if os.path.isfile(path): + if os.path.isfile(path) or not os.path.exists(path): return buffer2.FileBuffer(path, nl, name) elif os.path.isdir(path): return buffer2.DirBuffer(path, nl, name)