mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:09:11 +02:00
* fix problem if invalid drive is given
This commit is contained in:
parent
dd1bf3c4f2
commit
c8ec6d68c8
@ -1158,7 +1158,17 @@ program install;
|
|||||||
S := FExpand (Data.BasePath);
|
S := FExpand (Data.BasePath);
|
||||||
if S [Length (S)] = DirSep then
|
if S [Length (S)] = DirSep then
|
||||||
Dec (S [0]);
|
Dec (S [0]);
|
||||||
Space := DiskFree (byte (Upcase(S [1])) - 64) shr 10;
|
Space := DiskFree (byte (Upcase(S [1])) - 64);
|
||||||
|
{ -1 means that the drive is invalid }
|
||||||
|
if Space=-1 then
|
||||||
|
begin
|
||||||
|
if messagebox('The drive '+S[1]+': is not valid. Do you ' +
|
||||||
|
'want to change the installation path?',nil,
|
||||||
|
mferror+mfyesbutton+mfnobutton) = cmYes then
|
||||||
|
Continue;
|
||||||
|
Space:=0;
|
||||||
|
end;
|
||||||
|
Space := Space shr 10;
|
||||||
|
|
||||||
if Space < DSize then
|
if Space < DSize then
|
||||||
S := 'is not'
|
S := 'is not'
|
||||||
@ -1638,7 +1648,13 @@ begin
|
|||||||
createlog:=true
|
createlog:=true
|
||||||
{$ifdef MAYBE_LFN}
|
{$ifdef MAYBE_LFN}
|
||||||
else if paramstr(i)='--nolfn' then
|
else if paramstr(i)='--nolfn' then
|
||||||
locallfnsupport:=false
|
begin
|
||||||
|
locallfnsupport:=false;
|
||||||
|
{$ifdef GO32V2}
|
||||||
|
{ lfnsupport is a const in win32 RTL }
|
||||||
|
system.lfnsupport:=locallfnsupport;
|
||||||
|
{$endif GO32V2}
|
||||||
|
end
|
||||||
{$endif MAYBE_LFN}
|
{$endif MAYBE_LFN}
|
||||||
else if paramstr(i)='-h' then
|
else if paramstr(i)='-h' then
|
||||||
begin
|
begin
|
||||||
@ -1692,7 +1708,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2002-02-28 21:30:34 peter
|
Revision 1.5 2002-03-13 22:27:36 pierre
|
||||||
|
* fix problem if invalid drive is given
|
||||||
|
|
||||||
|
Revision 1.4 2002/02/28 21:30:34 peter
|
||||||
* regenated
|
* regenated
|
||||||
|
|
||||||
Revision 1.3 2002/02/28 17:02:08 pierre
|
Revision 1.3 2002/02/28 17:02:08 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user