Allow opening read-only files (e.g. system binaries) (#196)

This commit is contained in:
Daniel Molkentin 2017-07-11 18:41:58 +02:00 committed by radare
parent 6ed212a4ef
commit 76f3cc07fc

View File

@ -10,7 +10,7 @@
#include "settings.h"
#include <QSettings>
#include <QFileInfo>
OptionsDialog::OptionsDialog(MainWindow *main):
QDialog(0), // parent may not be main
@ -48,7 +48,8 @@ OptionsDialog::OptionsDialog(MainWindow *main):
connect(&analThread, SIGNAL(finished()), this, SLOT(anal_finished()));
ui->programLineEdit->setText(main->getFilename());
this->main->core->tryFile(main->getFilename(), true);
QFileInfo fi(this->main->getFilename());
this->main->core->tryFile(fi.filePath(), fi.isWritable());
}
OptionsDialog::~OptionsDialog()