aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/DirData.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-12-22 12:09:44 -0500
committerKen Moore <ken@ixsystems.com>2016-12-22 12:09:44 -0500
commit39e07a9256956a5f6af606375a679915d4e35215 (patch)
tree1f50c23adca58f748dd838bc03b84cd0275bb459 /src-qt5/desktop-utils/lumina-fm/DirData.h
parentCommit some cleanup of the monitor layout change detection/handling again. (diff)
downloadlumina-39e07a9256956a5f6af606375a679915d4e35215.tar.gz
lumina-39e07a9256956a5f6af606375a679915d4e35215.tar.bz2
lumina-39e07a9256956a5f6af606375a679915d4e35215.zip
Fix an issue with ZFS snapshot finding where the directory path of interest needs to be converted into the canonical path (evaluate all symlink redirects) first before the ZFS snapshot finder does it's work.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/DirData.h')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/DirData.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/DirData.h b/src-qt5/desktop-utils/lumina-fm/DirData.h
index c887ed5c..528a82d6 100644
--- a/src-qt5/desktop-utils/lumina-fm/DirData.h
+++ b/src-qt5/desktop-utils/lumina-fm/DirData.h
@@ -78,17 +78,18 @@ public:
}
void findSnapDir(){
+ QString canonpath = QDir(dirpath).canonicalPath();
//Search the filesystem
- if(dirpath.contains(ZSNAPDIR)){
- snapdir = dirpath.section(ZSNAPDIR,0,0)+ZSNAPDIR; //no need to go looking for it
+ if(canonpath.contains(ZSNAPDIR)){
+ snapdir =canonpath.section(ZSNAPDIR,0,0)+ZSNAPDIR; //no need to go looking for it
}else if(mntpoints.isEmpty()){
snapdir.clear(); //no zfs dirs available
}else{
//Only check the mountpoint associated with this directory
QString mnt;
for(int i=0; i<mntpoints.length(); i++){
- if(dirpath == mntpoints[i]){ mnt = mntpoints[i]; break; }
- else if(dirpath.startsWith(mntpoints[i]) && mntpoints[i].length()>mnt.length()){ mnt = mntpoints[i]; }
+ if(canonpath == mntpoints[i]){ mnt = mntpoints[i]; break; }
+ else if(canonpath.startsWith(mntpoints[i]) && mntpoints[i].length()>mnt.length()){ mnt = mntpoints[i]; }
}
if(QFile::exists(mnt+ZSNAPDIR)){ snapdir = mnt+ZSNAPDIR; }
else{ snapdir.clear(); } //none found
bgstack15