|
From: <du...@us...> - 2007-03-16 15:59:06
|
Revision: 189
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=189&view=rev
Author: dukus
Date: 2007-03-16 08:59:02 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Skin installation bug fixed
When update file not exist bug fixed
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
trunk/plugins/mpinstaler/MPInstaler/download_form.cs
trunk/plugins/mpinstaler/MPInstaler.suo
Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-14 17:01:09 UTC (rev 188)
+++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-16 15:59:02 UTC (rev 189)
@@ -44,7 +44,7 @@
while ((entry = s.GetNextEntry()) != null)
{
//MessageBox.Show(entry.Name);
- if (Path.GetFileName(entry.Name) ==Path.GetFileName(fl.FileName))
+ if (test_file(fl,entry))
{
string tpf =Path.GetFullPath(MPinstalerStruct.GetDirEntry(fl)) ;
if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE)
@@ -91,6 +91,25 @@
}
}
+ bool test_file(MPIFileList fl, ZipEntry ze)
+ {
+ if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE)
+ {
+ if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName)
+ && ze.Name.Contains(@"\"+fl.SubType+@"\"))
+ {
+ MessageBox.Show(ze.Name);
+ return true;
+ }
+ else return false;
+ }
+ else
+ {
+ if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName))
+ return true;
+ else return false;
+ }
+ }
public void installLanguage(ListBox lb)
{
MPLanguageHelper mpih = new MPLanguageHelper();
Modified: trunk/plugins/mpinstaler/MPInstaler/download_form.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-14 17:01:09 UTC (rev 188)
+++ trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-16 15:59:02 UTC (rev 189)
@@ -4,6 +4,7 @@
using System.Data;
using System.Drawing;
using System.Text;
+using System.IO;
using System.Windows.Forms;
using System.Net;
@@ -46,8 +47,12 @@
}
private void DownloadEnd(object sender, AsyncCompletedEventArgs e)
{
- if (e.Error!=null)
- MessageBox.Show(e.Error.Message+"\n"+e.Error.InnerException);
+ if (e.Error != null)
+ {
+ if (File.Exists(dest))
+ File.Delete(dest);
+ MessageBox.Show(e.Error.Message + "\n" + e.Error.InnerException);
+ }
button1.Enabled = false;
this.Close();
}
Modified: trunk/plugins/mpinstaler/MPInstaler.suo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|