2
0
Эх сурвалжийг харах

* fix base path handling - ensure using full path in the cfg files and avoid double slashes

git-svn-id: trunk@35433 -
Tomas Hajny 8 жил өмнө
parent
commit
12dddfb6c8

+ 4 - 3
installer/install.pas

@@ -1331,6 +1331,9 @@ end;
               messagebox('Please, choose the directory for installation first.',nil,mferror+mfokbutton)
               messagebox('Please, choose the directory for installation first.',nil,mferror+mfokbutton)
             else
             else
              begin
              begin
+               Data.BasePath := FExpand (Data.BasePath);
+               if Data.BasePath [Length (Data.BasePath)] = DirSep then
+                 Dec (Data.BasePath [0]);
                found:=false;
                found:=false;
                for j:=1 to cfg.packs do
                for j:=1 to cfg.packs do
                 if data.packmask[j]>0 then
                 if data.packmask[j]>0 then
@@ -1362,9 +1365,7 @@ end;
                     end;
                     end;
                   WriteLog ('Diskspace needed: ' + DotStr (DSize) + ' Kb');
                   WriteLog ('Diskspace needed: ' + DotStr (DSize) + ' Kb');
 
 
-                  S := FExpand (Data.BasePath);
-                  if S [Length (S)] = DirSep then
-                   Dec (S [0]);
+                  S := Data.BasePath;
                   Space := DiskFree (byte (Upcase(S [1])) - 64);
                   Space := DiskFree (byte (Upcase(S [1])) - 64);
                   { -1 means that the drive is invalid }
                   { -1 means that the drive is invalid }
                   if Space=-1 then
                   if Space=-1 then