Permalink
Browse files

Fix the order of the snapshot lists, list them in order of newest fir…

…st, which is the opposite of the lpreserver commands output.
  • Loading branch information...
1 parent 5a3263d commit 8091fcd864f1a0bb4266b0a72518e7c2ecbe9ce5 Ken Moore committed Aug 12, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 life-preserver/LPBackend.cpp
@@ -51,7 +51,7 @@ QStringList LPBackend::listSnapshots(QString dataset){
delete proc;
//Now process the output
QStringList list;
- for(int i=0; i<out.length(); i++){
+ for(int i=out.length()-1; i>=0; i++){ //go in reverse order for proper time format (newest first)
if(out[i].startsWith(dataset+"@")){
QString snap = out[i].section("@",1,3).section(" ",0,0).simplified();;
if(!snap.isEmpty()){ list << snap; }
@@ -142,6 +142,7 @@ bool LPBackend::revertSnapshot(QString dataset, QString snapshot){
bool LPBackend::browseSnapshot(QString dataset, QString snapshot){
//Not implemented yet
+ return false;
}
// ==================

0 comments on commit 8091fcd

Please sign in to comment.