mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Prefer SysUtils.IncludeTrailingPathDelimiter over home brown code
This commit is contained in:
@ -6399,8 +6399,7 @@ begin
|
||||
if Value then begin
|
||||
// Ensure directory exists
|
||||
LogDir := AppSettings.ReadString(asSessionLogsDirectory);
|
||||
if LogDir[Length(LogDir)] <> '\' then
|
||||
LogDir := LogDir + '\';
|
||||
LogDir := IncludeTrailingPathDelimiter(LogDir);
|
||||
ForceDirectories(LogDir);
|
||||
|
||||
// Determine free filename
|
||||
|
@ -1177,10 +1177,7 @@ begin
|
||||
ExportStreamStartOfQueryPos := 0;
|
||||
if ToDir then begin
|
||||
FreeAndNil(ExportStream);
|
||||
DbDir := comboExportOutputTarget.Text;
|
||||
if DbDir[Length(DbDir)] <> '\' then
|
||||
DbDir := DbDir + '\';
|
||||
DbDir := DbDir + DBObj.Database + '\';
|
||||
DbDir := IncludeTrailingPathDelimiter(comboExportOutputTarget.Text) + DBObj.Database + '\';
|
||||
if not DirectoryExists(DbDir) then
|
||||
ForceDirectories(DbDir);
|
||||
ExportStream := TFileStream.Create(DbDir + DBObj.Name+'.sql', fmCreate or fmOpenWrite);
|
||||
|
Reference in New Issue
Block a user