aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-21 13:37:28 -0400
committerKen Moore <moorekou@gmail.com>2015-10-21 13:37:28 -0400
commitc8775edd2ceff03e43f79f99997607daf8649af5 (patch)
treedbe931f550af104c76d4d9a41f87bed823c77a0b
parentClean up the detection of ZFS snapshot availability a bit: This should fix is... (diff)
downloadlumina-c8775edd2ceff03e43f79f99997607daf8649af5.tar.gz
lumina-c8775edd2ceff03e43f79f99997607daf8649af5.tar.bz2
lumina-c8775edd2ceff03e43f79f99997607daf8649af5.zip
Fix up a bug with the relative snapshot path calculation when switching between snapshots.
-rw-r--r--lumina-fm/widgets/DirWidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp
index 2f172337..46aa2cf3 100644
--- a/lumina-fm/widgets/DirWidget.cpp
+++ b/lumina-fm/widgets/DirWidget.cpp
@@ -484,6 +484,7 @@ void DirWidget::LoadDir(QString dir, QList<LFileInfo> list){
void DirWidget::LoadSnaps(QString basedir, QStringList snaps){
//Save these value internally for use later
+ qDebug() << "ZFS Snapshots available:" << basedir << snaps;
snapbasedir = basedir;
snapshots = snaps;
if(!snapbasedir.isEmpty()){ watcher->addPath(snapbasedir); } //add this to the watcher in case snapshots get created/removed
@@ -832,11 +833,11 @@ void DirWidget::on_slider_snap_valueChanged(int val){
emit findSnaps(ID, normalbasedir);
return;
}
- if(snaprelpath.isEmpty()){
+ //if(snaprelpath.isEmpty()){
//Need to figure out the relative path within the snapshot
snaprelpath = normalbasedir.section(snapbasedir.section(ZSNAPDIR,0,0), 1,1000);
if(DEBUG){ qDebug() << " - new snapshot-relative path:" << snaprelpath; }
- }
+ //}
dir.append(snaprelpath);
dir.replace("//","/"); //just in case any duplicate slashes from all the split/combining
if(DEBUG){ qDebug() << " - Load Snapshot:" << dir; }
bgstack15