parent
f4abeb6433
commit
03cbde8a74
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue