Skip to content

Commit

Permalink
Prevent app keep running when all files invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
ryonakano committed Dec 14, 2024
1 parent 648d7af commit 2b90d28
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ public class BluetoothApp : Gtk.Application {
if (arg_files != null) {
File[] files = create_files_for_args (command, arg_files);

if (files.length > 0) {
scan_and_send_files (files);
// None of files passed are valid
if (files.length == 0) {
return 1;
}

scan_and_send_files (files);
}

return 0;
Expand Down

0 comments on commit 2b90d28

Please sign in to comment.