aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-03-05 11:58:09 -0500
committerKen Moore <ken@pcbsd.org>2015-03-05 11:58:09 -0500
commitf92d01a5572a1083ae6e1c39b44bafd2f0e2c82b (patch)
tree182653ca8b79ddc9cc9e1726483494a38d8636b1 /lumina-fm
parentOops, apparently I forgot the line which copies a *.desktop "Path=" value int... (diff)
downloadlumina-f92d01a5572a1083ae6e1c39b44bafd2f0e2c82b.tar.gz
lumina-f92d01a5572a1083ae6e1c39b44bafd2f0e2c82b.tar.bz2
lumina-f92d01a5572a1083ae6e1c39b44bafd2f0e2c82b.zip
Fix a bug with resolving sym-links during the search for ZFS snapshots. Now it will always start with the canonical path (no sym links or redundant paths).
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/BackgroundWorker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lumina-fm/BackgroundWorker.cpp b/lumina-fm/BackgroundWorker.cpp
index 7b7829d7..cdb0644d 100644
--- a/lumina-fm/BackgroundWorker.cpp
+++ b/lumina-fm/BackgroundWorker.cpp
@@ -16,6 +16,8 @@ BackgroundWorker::~BackgroundWorker(){
void BackgroundWorker::startDirChecks(QString path){
QDir dir(path);
+ //Make sure to remove any symlinks or redundency in the path
+ if(dir.canonicalPath()!=path){ path = dir.canonicalPath(); dir.cd(path); }
qDebug() << "Starting Dir Checks:" << path;
//First check for image files
if(imgFilter.isEmpty()){
@@ -49,7 +51,7 @@ void BackgroundWorker::startDirChecks(QString path){
//no need to re-search for it - just found it recently
baseSnapDir= csnapdir; found=true;
}else{
- while(dir.absolutePath()!="/" && !found){
+ while(dir.canonicalPath()!="/" && !found){
if(dir.exists(".zfs/snapshot")){
baseSnapDir = dir.canonicalPath()+"/.zfs/snapshot";
found = true;
bgstack15