]> git.sur5r.net Git - bacula/bacula/commitdiff
Kludge fix to bat brestore crash
authorKern Sibbald <kern@sibbald.com>
Sat, 30 Apr 2011 14:39:07 +0000 (16:39 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:44:35 +0000 (14:44 +0200)
bacula/src/qt-console/restore/brestore.cpp

index f59f721226717bb281c54295628d302968d19aac..8102409327fa81b8ea2ced4bc3505ecdfc6e7dec 100644 (file)
@@ -205,11 +205,14 @@ void bRestore::displayFiles(int64_t pathid, QString path)
          int col=0;
          //PathId, FilenameId, fileid, jobid, lstat, path
          fieldlist = resultline.split("\t");
+         /*
+          * Note, the next line zaps variable "item", probably
+          *   because the input data in fieldlist is bad.
+          */
+         decode_stat(fieldlist.at(4).toLocal8Bit().data(), &statp, &LinkFI);
          TableItemFormatter item(*FileList, row++);
          item.setFileType(col++, QString("folder")); // folder or file
          item.setTextFld(col++, fieldlist.at(5)); // path
-         decode_stat(fieldlist.at(4).toLocal8Bit().data(), 
-                     &statp, &LinkFI);
          item.setBytesFld(col++, QString().setNum(statp.st_size));
          item.setDateFld(col++, statp.st_mtime); // date
          fieldlist.replace(3, m_jobids);      // use current jobids selection