* A package now always has a filename, to fix PAckageRemoteArchive

git-svn-id: trunk@32759 -
This commit is contained in:
joost 2015-12-27 11:55:09 +00:00
parent d44100448c
commit 3f3c8197fb
2 changed files with 3 additions and 10 deletions

View File

@ -358,6 +358,8 @@ begin
begin
URI:=ParseURI(DownloadURL);
Result:=URI.Document;
if Result='' then
Result:=ChangeFileExt(Name,'.zip');
end
else
Result:=FFileName;

View File

@ -159,22 +159,13 @@ end;
function PackageLocalArchive(APackage:TFPPackage): String;
var
S: String;
begin
if APackage.Name=CurrentDirPackageName then
Error(SErrNoPackageSpecified)
else if APackage.Name=CmdLinePackageName then
Result:=APackage.LocalFileName
else
begin
S:=APackage.FileName;
if S='' then
begin
S:=ChangeFileExt(APackage.Name,'.zip');
end;
Result:=GlobalOptions.ArchivesDir+S;
end;
Result:=GlobalOptions.ArchivesDir+APackage.FileName;
end;