mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-27 00:09:50 -05:00
SImplify a bit the file validation
This commit is contained in:
parent
61a4b9c866
commit
ed03ea1252
@ -244,12 +244,8 @@ def main():
|
||||
|
||||
# validation
|
||||
if filenames:
|
||||
valid = True
|
||||
for filename in filenames:
|
||||
if not os.path.exists(filename):
|
||||
alert(strings._("not_a_file", True).format(filename))
|
||||
valid = False
|
||||
if not valid:
|
||||
if any(not os.path.isfile(filename) for filename in filenames)
|
||||
alert(strings._("not_a_file", True).format(filename))
|
||||
sys.exit()
|
||||
|
||||
# create the onionshare icon
|
||||
|
Loading…
Reference in New Issue
Block a user