فهرست منبع

* patch from Bart for mantis 35271 committed. Avoid create directory block when extractfilepath(<filename>) is empty

git-svn-id: trunk@41860 -
marco 6 سال پیش
والد
کامیت
93a3764cd5
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      utils/fpcmkcfg/fpcmkcfg.pp

+ 3 - 2
utils/fpcmkcfg/fpcmkcfg.pp

@@ -499,7 +499,7 @@ Procedure CreateFile;
 
 Var
   Fout : Text;
-  S,BFN : String;
+  S,BFN,ODir : String;
   I : Integer;
 
 begin
@@ -527,7 +527,8 @@ begin
     else
       Writeln(Format(SBackupCreated,[ExtractFileName(OutputFileName),ExtractFileName(BFN)]));
     end;
-  if (OutputFileName<>'') and not DirectoryExists(ExtractFilePath(OutputFileName)) then
+  ODir:=ExtractFilePath(OutputFileName);
+  if (OutputFileName<>'') and (ODir<>'') and not DirectoryExists(ODir) then
     begin
     if CreateDir then
       begin