Permalink
Browse files

Small bug fix on extracting

  • Loading branch information...
1 parent 3175734 commit ef5b6050a4802d3eabfeecdedb1cdd4925c9c192 @philc committed Oct 24, 2006
Showing with 19 additions and 2 deletions.
  1. +9 −1 data/applists/testing.xml
  2. +10 −1 src/ApplicationListItem.Installation.cs
@@ -4,15 +4,23 @@
<SimultaneousDownloads>3</SimultaneousDownloads>
</InstallationOptions>
<Application>
+ <Name>Zip file</Name>
+ <FileUrl>http://www.installpad.com/test/test4.zip</FileUrl>
+ </Application>
+ <Application>
<Name>Azureus</Name>
<FileUrl>http://easynews.dl.sourceforge.net/sourceforge/azureus/Azureus_2.4.0.2_Win32.setup.exe1</FileUrl>
<Options>
<SilentInstall />
<InstallerArguments>&lt;&gt;^ -/s</InstallerArguments>
- <Checked>false</Checked>
+ <Checked>false</Checked>
</Options>
</Application>
<Application>
+ <Name>FireFox</Name>
+ <FileUrl>http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/1.5.0.7/win32/en-US/Firefox%20Setup%201.5.0.7.exe</FileUrl>
+ </Application>
+ <Application>
<Name>FireFox FTP</Name>
<FileUrl>ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5/win32/en-US/Firefox%20Setup%201.5.exe</FileUrl>
</Application>
@@ -215,7 +215,16 @@ private void AsyncZipInstall(object data)
Exception ex = null;
try
{
- Zip.Instance.ExtractZip(downloader.DownloadingTo, InstallPadApp.AppList.InstallationOptions.InstallationRoot);
+ string extractTo =null;
+ // If the application has an InstallationRoot option set, extract there. Otherwise
+ // use the user preference's InstallationRoot
+ string appRoot = this.application.Options.InstallationRoot;
+ if (appRoot != null && appRoot.Length > 0)
+ extractTo = appRoot;
+ else
+ extractTo = InstallPadApp.Preferences.InstallationRoot;
+
+ Zip.Instance.ExtractZip(downloader.DownloadingTo, InstallPadApp.Preferences.InstallationRoot);
}
catch (Exception e)
{

0 comments on commit ef5b605

Please sign in to comment.