Fixed bug in FileViewFrame where directory was printed twice

This commit is contained in:
Gordon McCann 2021-07-13 17:26:47 -04:00
parent e9168bed2a
commit 1c9c97983f

View File

@ -112,7 +112,9 @@ void FileViewFrame::DoOk() {
fCancelButton->SetState(kButtonDisabled);
TString filename = fNameField->GetText();
TString fullpath = TString(fContents->GetDirectory()) + "/" + filename;
TString fullpath;
if(!dirFlag) fullpath = TString(fContents->GetDirectory()) + "/" + filename;
else fullpath = filename;
if(fullpath == "") { //check validity
std::cerr<<"Need to give a name!"<<std::endl;
fOkButton->SetState(kButtonUp);