Browse Source

* Patch to avoid error when trying to create empty directory

git-svn-id: trunk@24240 -
michael 12 years ago
parent
commit
1824a932a3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/fcl-base/src/inifiles.pp

+ 3 - 2
packages/fcl-base/src/inifiles.pp

@@ -951,8 +951,9 @@ begin
     if FFileName > '' then
     if FFileName > '' then
       begin
       begin
       D:=ExtractFilePath(FFileName);
       D:=ExtractFilePath(FFileName);
-      if not ForceDirectories(D) then
-        Raise EInoutError.CreateFmt(SErrCouldNotCreatePath,[D]);
+      If D <> '' Then
+        if not ForceDirectories(D) then
+          Raise EInoutError.CreateFmt(SErrCouldNotCreatePath,[D]);
       slLines.SaveToFile(FFileName);
       slLines.SaveToFile(FFileName);
       end
       end
     else if FStream <> nil then
     else if FStream <> nil then