Skip to content

Commit

Permalink
Insert missing try - catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Paul Wootten authored and Jeremy Paul Wootten committed Oct 22, 2023
1 parent d31b75d commit 6b086b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/View/AbstractDirectoryView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,12 @@ namespace Files {
}

file.info.set_attribute_string ("metadata::hidden", val.to_string ());
file.location.set_attribute_string ("metadata::hidden", val.to_string (), FileQueryInfoFlags.NONE, null);
try {
file.location.set_attribute_string ("metadata::hidden", val.to_string (), FileQueryInfoFlags.NONE, null);
} catch (Error e) {
warning ("Error setting attribute 'metadata::hidden' - %s", e.message);
}

}

// If not showing hidden files reload view to reflect changes
Expand Down

0 comments on commit 6b086b3

Please sign in to comment.