[ViewProperties] Check part of home first before doing file system stuff
ClosedPublic

Authored by broulik on Sep 3 2018, 10:17 AM.

Details

Summary

There's no point in creating a QFileInfo instance and checking for file properties if we're not going to do anything with it when not inside home

Test Plan
  • Accessing a slow or stale mount in /run/user/foo/bar no longer blocks here and is a nice simple optimization anyway imho

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Sep 3 2018, 10:17 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 3 2018, 10:17 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Sep 3 2018, 10:17 AM

I don't understand well the is part of home stuff, do you mean checking for things out of /home?

From what I understand if the file is not inside /home/user then it will not even try writing into the .directory file of a folder but always save it in Dolphin's config folder

+1, but someone else must approve.

elvisangelaccio accepted this revision.Sep 15 2018, 10:39 AM
elvisangelaccio added inline comments.
src/views/viewproperties.cpp
71–73

I'd just remove these comments, because they are a bit confusing (and we already have a better comment at the top of the if-else chain).

This revision is now accepted and ready to land.Sep 15 2018, 10:39 AM
This revision was automatically updated to reflect the committed changes.