Skip to content

Commit be0c09e

Browse files
authored
Merge pull request #39 from sitiom/patch-1
Use ForceDirectories() instead of CreateDir()
2 parents b9226d2 + 2f03ea5 commit be0c09e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/devcpp.dpr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ begin
147147
const DevCppDir = 'Embarcadero\Dev-Cpp';
148148

149149
// Store the INI file in %APPDATA% or if we are not allowed to do so, in the exe directory
150-
if (not devData.IsPortable) and ((AppData <> '') and (DirectoryExists(AppData + DevCppDir) or CreateDir(AppData + DevCppDir))) then
150+
if (not devData.IsPortable) and ((AppData <> '') and (DirectoryExists(AppData + DevCppDir) or ForceDirectories(AppData + DevCppDir))) then
151151
devData.INIFileName := AppData + DevCppDir + INIFileName
152152
else
153153
begin
154154
// default dir should be C:\Users\<username>\Documents\Embarcadero\Dev-Cpp
155155
AppData := IncludeTrailingBackslash(TPath.GetDocumentsPath);
156156

157157
// Store the INI file in C:\Users\<username>\Documents or if we are not allowed to do so, in the exe directory
158-
if (not devData.IsPortable) and ((AppData <> '') and (DirectoryExists(AppData + DevCppDir) or CreateDir(AppData + DevCppDir))) then
158+
if (not devData.IsPortable) and ((AppData <> '') and (DirectoryExists(AppData + DevCppDir) or ForceDirectories(AppData + DevCppDir))) then
159159
devData.INIFileName := AppData + DevCppDir + INIFileName
160160
else
161161
begin

0 commit comments

Comments
 (0)