mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Seems ForceDirectories does not create all subdirectories if we have two slashes between dirnames. Happens when the user appends a slash to the end of the output directory.
This commit is contained in:
@ -971,10 +971,13 @@ begin
|
||||
StartTime := GetTickCount;
|
||||
if ToDir then begin
|
||||
FreeAndNil(ExportStream);
|
||||
DbDir := comboExportOutputTarget.Text + '\' + DBObj.Database;
|
||||
DbDir := comboExportOutputTarget.Text;
|
||||
if DbDir[Length(DbDir)] <> '\' then
|
||||
DbDir := DbDir + '\';
|
||||
DbDir := DbDir + DBObj.Database + '\';
|
||||
if not DirectoryExists(DbDir) then
|
||||
ForceDirectories(DbDir);
|
||||
ExportStream := TFileStream.Create(DbDir+'\'+DBObj.Name+'.sql', fmCreate or fmOpenWrite);
|
||||
ExportStream := TFileStream.Create(DbDir + DBObj.Name+'.sql', fmCreate or fmOpenWrite);
|
||||
end;
|
||||
if ToFile and (not Assigned(ExportStream)) then
|
||||
ExportStream := TFileStream.Create(comboExportOutputTarget.Text, fmCreate or fmOpenWrite);
|
||||
|
Reference in New Issue
Block a user