mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-05 19:55:17 -04:00
SImplify a bit the file validation
This commit is contained in:
parent
61a4b9c866
commit
ed03ea1252
1 changed files with 2 additions and 6 deletions
|
@ -244,12 +244,8 @@ def main():
|
|||
|
||||
# validation
|
||||
if filenames:
|
||||
valid = True
|
||||
for filename in filenames:
|
||||
if not os.path.exists(filename):
|
||||
if any(not os.path.isfile(filename) for filename in filenames)
|
||||
alert(strings._("not_a_file", True).format(filename))
|
||||
valid = False
|
||||
if not valid:
|
||||
sys.exit()
|
||||
|
||||
# create the onionshare icon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue