From 1d80ab9569a0d290152819f0b4712a768b877b4b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 30 Apr 2011 16:39:07 +0200 Subject: [PATCH] Kludge fix to bat brestore crash --- bacula/src/qt-console/restore/brestore.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bacula/src/qt-console/restore/brestore.cpp b/bacula/src/qt-console/restore/brestore.cpp index f59f721226..8102409327 100644 --- a/bacula/src/qt-console/restore/brestore.cpp +++ b/bacula/src/qt-console/restore/brestore.cpp @@ -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 -- 2.39.5