Skip to content

Commit 152ab70

Browse files
committed
fix: invalid folder path for SQL export cannot be created if it contains a duplicated path delimiter
Custom output dir may already have a trailing path delimiter, only add when not Broken in 2e290f1 Refs #2558
1 parent 9917a4c commit 152ab70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/tabletools.pas

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

18491849
if ToDir then begin
18501850
FreeAndNil(ExportStream);
1851-
DbDir := GetOutputFilename(comboExportOutputTarget.Text, DBObj) + PathDelim + DBObj.Database + PathDelim;
1851+
DbDir := IncludeTrailingPathDelimiter(GetOutputFilename(comboExportOutputTarget.Text, DBObj)) + DBObj.Database + PathDelim;
18521852
if not DirectoryExists(DbDir) then
18531853
ForceDirectories(DbDir);
18541854
ExportStream := TFileStream.Create(DbDir + DBObj.ObjType.ToLower + '-' + DBObj.Name+'.sql', fmCreate or fmOpenWrite);

0 commit comments

Comments
 (0)