From 2b6ede9432ea7c947aa1d5a98762ee4dc2d5e3fc Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 18 May 2015 13:05:51 -0400 Subject: Fix a bug in the background snapshot finder: the new simplification routine was incorrectly being used, because the variable being checked was set just moments before (resulting in it always re-using the first snapshot directory found) --- lumina-fm/BackgroundWorker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lumina-fm/BackgroundWorker.cpp') diff --git a/lumina-fm/BackgroundWorker.cpp b/lumina-fm/BackgroundWorker.cpp index 02d2f02e..f8e036ac 100644 --- a/lumina-fm/BackgroundWorker.cpp +++ b/lumina-fm/BackgroundWorker.cpp @@ -42,16 +42,18 @@ void BackgroundWorker::startDirChecks(QString path){ qDebug() << " - done with audio/multimedia checks"; //Now check for ZFS snapshots of the directory if(!QFileInfo(path).isWritable() ){ return; } //skip ZFS checks if can't restore to this dir - cdir = path; + //cdir = path; QStringList snapDirs; QString baseSnapDir; bool found = false; qDebug() << " - start searching for base snapshot directory"; if(cdir == path && QFile::exists(csnapdir) ){ //no need to re-search for it - just found it recently + qDebug() << " -- Use previous dir:" << cdir << csnapdir; baseSnapDir= csnapdir; found=true; }else{ while(dir.canonicalPath()!="/" && !found){ + qDebug() << " -- Checking for snapshot dir:" << dir.canonicalPath(); if(dir.exists(".zfs/snapshot")){ baseSnapDir = dir.canonicalPath()+"/.zfs/snapshot"; found = true; -- cgit