mirror of
https://github.com/onionshare/onionshare.git
synced 2025-03-13 09:26:37 -04:00
Fix bug with validating filenames from args in GUI
This commit is contained in:
parent
b6a3edd1db
commit
2c3d66de44
@ -92,10 +92,10 @@ def main():
|
||||
valid = True
|
||||
for filename in filenames:
|
||||
if not os.path.isfile(filename) and not os.path.isdir(filename):
|
||||
Alert(self.common, strings._("not_a_file", True).format(filename))
|
||||
Alert(common, strings._("not_a_file", True).format(filename))
|
||||
valid = False
|
||||
if not os.access(filename, os.R_OK):
|
||||
Alert(self.common, strings._("not_a_readable_file", True).format(filename))
|
||||
Alert(common, strings._("not_a_readable_file", True).format(filename))
|
||||
valid = False
|
||||
if not valid:
|
||||
sys.exit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user