Skip to content

Commit 4555274

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 84104d0 Refs #2558
1 parent 379d28a commit 4555274

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
@@ -1827,7 +1827,7 @@ procedure TfrmTableTools.DoExport(DBObj: TDBObject);
18271827

18281828
if ToDir then begin
18291829
FreeAndNil(ExportStream);
1830-
DbDir := GetOutputFilename(comboExportOutputTarget.Text, DBObj) + PathDelim + DBObj.Database + PathDelim;
1830+
DbDir := IncludeTrailingPathDelimiter(GetOutputFilename(comboExportOutputTarget.Text, DBObj)) + DBObj.Database + PathDelim;
18311831
if not DirectoryExists(DbDir) then
18321832
ForceDirectories(DbDir);
18331833
ExportStream := TFileStream.Create(DbDir + DBObj.ObjType.ToLower + '-' + DBObj.Name+'.sql', fmCreate or fmOpenWrite);

0 commit comments

Comments
 (0)