Commit ef8add0b authored by Michael Terry's avatar Michael Terry

BackendRemote: Guard against returning a null GFile if we can't find mount

I'm not sure what error we're running into, but I have a report of
someone hitting a null GFile in this code path. So this commit makes
sure that can't happen, and prints the error to console so we can
get more information next time this would happen.
parent f06bf96f
......@@ -78,11 +78,12 @@ public class BackendRemote : BackendFile
// simply check if there is a relative path between the two.
if (root.equal(mount_root) || !root.has_prefix(mount_root))
root = mount.get_default_location();
return root.get_child_for_display_name(folder);
} catch (Error e) {
return null;
}
catch (Error e) {
warning("%s", e.message);
}
return root.get_child_for_display_name(folder);
}
public override bool is_native() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment