mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 18:52:58 -03:00
Fix bug with validating filenames from args in GUI
This commit is contained in:
parent
fee1d49563
commit
929ad58ebd
1 changed files with 2 additions and 2 deletions
|
@ -92,10 +92,10 @@ def main():
|
||||||
valid = True
|
valid = True
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
if not os.path.isfile(filename) and not os.path.isdir(filename):
|
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
|
valid = False
|
||||||
if not os.access(filename, os.R_OK):
|
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
|
valid = False
|
||||||
if not valid:
|
if not valid:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
Loading…
Add table
Reference in a new issue