From e34da6157a1c6c1a8f29ba67a00487f7ea9ee771 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 13 May 2007 16:06:45 +0000 Subject: [PATCH] Fix restore before command git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4770 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/main.cpp | 2 +- bacula/src/qt-console/restore/prerestore.cpp | 11 +++++------ bacula/src/qt-console/restore/restore.cpp | 3 +-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bacula/src/qt-console/main.cpp b/bacula/src/qt-console/main.cpp index 9c04b22997..dcc24f95b8 100644 --- a/bacula/src/qt-console/main.cpp +++ b/bacula/src/qt-console/main.cpp @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) #endif init_stack_dump(); - my_name_is(argc, argv, "gnome-console"); + my_name_is(argc, argv, "bat"); init_msg(NULL, NULL); working_directory = "/tmp"; diff --git a/bacula/src/qt-console/restore/prerestore.cpp b/bacula/src/qt-console/restore/prerestore.cpp index 56995db43f..a97eeba592 100644 --- a/bacula/src/qt-console/restore/prerestore.cpp +++ b/bacula/src/qt-console/restore/prerestore.cpp @@ -133,11 +133,6 @@ void prerestorePage::okButtonPushed() this->hide(); cmd = QString("restore "); - if (selectFilesRadio->isChecked()) { - cmd += "select "; - } else { - cmd += "all done "; - } cmd += "fileset=\"" + filesetCombo->currentText() + "\" "; cmd += "client=\"" + clientCombo->currentText() + "\" "; if (selectJobsRadio->isChecked()) { @@ -155,6 +150,11 @@ void prerestorePage::okButtonPushed() } else { cmd += "jobid=\"" + jobIdEdit->text() + "\""; } + if (selectFilesRadio->isChecked()) { + cmd += " select"; + } else { + cmd += " all done"; + } /* ***FIXME*** */ printf("preRestore command \'%s\'\n", cmd.toUtf8().data()); @@ -334,4 +334,3 @@ bool prerestorePage::checkJobIdList() } return true; } - diff --git a/bacula/src/qt-console/restore/restore.cpp b/bacula/src/qt-console/restore/restore.cpp index b6480079f4..67c2562732 100644 --- a/bacula/src/qt-console/restore/restore.cpp +++ b/bacula/src/qt-console/restore/restore.cpp @@ -375,9 +375,8 @@ char *restorePage::get_cwd() m_cwd = m_console->msg(); Dmsg2(100, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg()); } else { - Dmsg1(000, "stat=%d\n", stat); + Dmsg1(000, "Something went wrong read stat=%d\n", stat); QMessageBox::critical(this, "Error", ".pwd command failed", QMessageBox::Ok); - Dmsg1(000, "stat=%d\n", stat); } m_console->discardToPrompt(); return m_cwd.toUtf8().data(); -- 2.39.5