Skip to content

Commit 41615e6

Browse files
committed
fix: replace hardcoded Windows directory separator with DirectorySeparator
1 parent 7171e48 commit 41615e6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

source/main.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5233,7 +5233,7 @@ procedure TMainform.popupQueryLoadClick(Sender: TObject);
52335233
// Click on the popupQueryLoad
52345234
Filename := (Sender as TMenuItem).Caption;
52355235
Filename := StripHotkey(Filename);
5236-
if Pos('\', Filename) = 0 then // assuming we load a snippet
5236+
if Pos(DirectorySeparator, Filename) = 0 then // assuming we load a snippet
52375237
Filename := AppSettings.DirnameSnippets + Filename + FILEEXT_SNIPPET
52385238
else begin // assuming we load a file from the recent-list
52395239
p := Pos(' ', Filename) + 1;

source/tabletools.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ procedure TfrmTableTools.DoExport(DBObj: TDBObject);
18211821

18221822
if ToDir then begin
18231823
FreeAndNil(ExportStream);
1824-
DbDir := IncludeTrailingPathDelimiter(GetOutputFilename(comboExportOutputTarget.Text, DBObj)) + DBObj.Database + '\';
1824+
DbDir := GetOutputFilename(comboExportOutputTarget.Text, DBObj) + DirectorySeparator + DBObj.Database + DirectorySeparator;
18251825
if not DirectoryExists(DbDir) then
18261826
ForceDirectories(DbDir);
18271827
ExportStream := TFileStream.Create(DbDir + DBObj.ObjType.ToLower + '-' + DBObj.Name+'.sql', fmCreate or fmOpenWrite);

0 commit comments

Comments
 (0)