Skip to content

Commit

Permalink
create_directory_with_parents_async: adjust control flow
Browse files Browse the repository at this point in the history
Makes function a bit easier to read.
  • Loading branch information
v1993 committed Oct 14, 2024
1 parent 983cdbb commit 5d0618b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Utils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ namespace NXDumpClient {
while(current_target != null) {
try {
yield current_target.make_directory_async(Priority.DEFAULT, cancellable);
break;
} catch(IOError.EXISTS e) {
break;
} catch(IOError.NOT_FOUND e) {
to_create += current_target;
current_target = current_target.get_parent();
continue;
} catch(IOError.EXISTS e) {
break;
}
break;
}

for (int i = to_create.length - 1; i >= 0; --i) {
Expand Down

0 comments on commit 5d0618b

Please sign in to comment.