Skip to content

Commit

Permalink
Windows GUI: Use file folder and name as export default for single file
Browse files Browse the repository at this point in the history
  • Loading branch information
cjee21 committed May 29, 2024
1 parent ffb97a7 commit cb0c3c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/GUI/VCL/GUI_Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,12 @@ void __fastcall TMainF::M_File_ExportClick(TObject *Sender)
Name=Prefs->BaseFolder;
Name.resize(Name.size()-1);
Name=Name.substr(0, Name.rfind(__T("\\"))+1); //Folder of MediaInfo

//If only one file, use folder and filename of that file with added suffix
if (I->Count_Get()==1) {
Name=I->Get(0, Stream_General, 0, __T("CompleteName")).c_str();
Name.append(__T(".mediainfo."));
}
}
else
Name=GUI_Text(OpenDialog1->InitialDir);
Expand Down

0 comments on commit cb0c3c9

Please sign in to comment.