uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Support and feedback for UniUploader
UniUploader requires microsoft .net runtimes!

uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Postby Tupsi » Mon Feb 26, 2007 3:59 pm

well at least thats what I have figured out so far.

For instance charprof works if I upload it to UA without the interface/addons structure inside the zip and of course dont set the checkbox for it.

ora2 for instance or others I tried which have subfolders in the zip file dont work. I get the following:

Code: Select all
[2007.02.26 15:10:24] Addon Retrieval Response:
[2007.02.26 15:10:24] http://www.fraternitas-ferreus.net/ua/addon_zips/ora2.zip
[2007.02.26 15:10:24] File Name: ora2.zip
[2007.02.26 15:10:24] zipFileLocalLocation: S:\download\wow\temp\ora2.zip
[2007.02.26 15:10:24] Downloading.: http://www.fraternitas-ferreus.net/ua/addon_zips/ora2.zip
[2007.02.26 15:10:27] Unzipping
[2007.02.26 15:10:27] Creating Directory: S:\download\wow\temp\Interface\AddOns\oRA2
[2007.02.26 15:10:27] Unzipping
[2007.02.26 15:10:27] UpdateAddons: Ein Teil des Pfades S:\download\wow\temp\Interface\AddOns\oRA2\Participant\Buff.lua konnte nicht gefunden werden.
[2007.02.26 15:10:27] 1 Addon Updated.


stuff i already tried:
- renaming the zip to the addon folder name as in ancient times
- adding interface/addon and checkboxing the full path name
- removing the spaces in the addon properties of UA as described in the "know bug" section here

From the error above it seems that UU is unable to extrace the subfolders from the zip properly. As the downloaded ora2.zip is still in the wow directory, I can assure the download itself went flawless, it is the zip I uploaded to UA in all its beaty (read subfolders here).

any ideas?

ok, just tried the old UU 2.5 and this version extracts the zip just fine. Of course its not usuable as it has no clue about interface/addons changes, so my ora2 ends up in the wow directory instead of interface/addons, but at least the unzip works. So it seems to me it is infact a problem of UU instead of UA? So maybe move this post to the UU section.

edit: made a new post in UU forum, trying to delete the old one in UA now
Tupsi
WR.net Apprentice
WR.net Apprentice
 
Posts: 74
Joined: Fri Jul 14, 2006 5:26 pm

uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Postby MattM » Mon Feb 26, 2007 5:25 pm

can you please translate the error
MattM
UA/UU Developer
UA/UU Developer
Gimpy Developer
Gimpy Developer
 
Posts: 886
Joined: Tue Jul 04, 2006 9:53 pm
Location: USA

Re: uu 2.6.1 + ua 0.7.5 problems with addons having subfolde

Postby Carasak » Mon Feb 26, 2007 5:27 pm

Code: Select all
[2007.02.26 15:10:27UpdateAddonsEin Teil des Pfades S:downloadwowtempInterfaceAddOnsoRA2ParticipantBuff.lua konnte nicht gefunden werden

part of the path S:\download\wow\temp\Interface\AddOns\oRA2\Participant\Buff.lua could not be located/found
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Postby Shadowsong » Mon Feb 26, 2007 8:35 pm

It's not exactly the same problem, but a bug too.

I've checked MobHealth3 to test the WoWAce Addon Module.

All I've got is a subfolder in Interface/AddOns called "Interface".

Note: The new Interface folder is empty.
Last edited by Shadowsong on Mon Feb 26, 2007 9:46 pm, edited 1 time in total.
User avatar
Shadowsong
WR.net Apprentice
WR.net Apprentice
 
Posts: 32
Joined: Wed Feb 14, 2007 2:39 pm

Re: uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Postby MattM » Mon Feb 26, 2007 10:50 pm

Shadowsong wrote:It's not exactly the same problem, but a bug too.

I've checked MobHealth3 to test the WoWAce Addon Module.

All I've got is a subfolder in Interface/AddOns called "Interface".

Note: The new Interface folder is empty.


please post the full debug log and the addon causing this
MattM
UA/UU Developer
UA/UU Developer
Gimpy Developer
Gimpy Developer
 
Posts: 886
Joined: Tue Jul 04, 2006 9:53 pm
Location: USA

uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Postby jlaplaca » Mon Feb 26, 2007 10:55 pm

Well I just download the new source code, 2.6.1 i have found out why we get this error. Well it's do to the fact that U.U. only creates one folder for the main addon. But if there is any other subfolders it don't create them. the problem code is around, Line 4737.

So I Edit lines 4660-4777
Code: Select all
      public void UnzipAddon(string filename,ArrayList files)
      {
         
         bool addon = false;
         foreach(string file in files)
         {
            if (IndexOfI(file,@"\\Interface\\AddOns\\") == 0)addon = true;
         }
         bool firstFile = true;
         
         //string path = System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase ).Replace("file:\\","") + @"\"+filename;
         ZipInputStream s = new ZipInputStream(File.OpenRead(filename));
         ZipEntry theEntry;
         bool pathIncluded = false;
         while ((theEntry = s.GetNextEntry()) != null)
         {
            string directoryName = "";
            pathIncluded = false;
            if ( IndexOfI(theEntry.Name,@"Interface\\AddOns") > -1 || IndexOfI(theEntry.Name,@"Interface/AddOns") > -1)pathIncluded = true;

            if (pathIncluded && addon)
            {
               directoryName = GetInstallPath()+@"\"+Path.GetDirectoryName(theEntry.Name);
            }
            else if(addon && !pathIncluded)
            {
               directoryName = GetInstallPath()+"\\Interface\\AddOns\\"+Path.GetDirectoryName(theEntry.Name);
            }
            else if (!addon)
            {
               directoryName = GetInstallPath()+@"\"+Path.GetDirectoryName(theEntry.Name);
            }

            string fileName = Path.GetFileName(theEntry.Name);
            
            if (firstFile)
            {
               firstFile = false;
               if (Directory.Exists(directoryName))
               {
                  //make SURE its not a screwed up addon, and about to delete the wrong folder!~!!!!
                  string addonPath = (GetInstallPath()+"\\Interface\\AddOns\\");
                  string addonPath2 = (GetInstallPath()+"\\Interface\\AddOns");
                  string addonPath3 = (GetInstallPath()+"\\Interface\\");
                  string addonPath4 = (GetInstallPath()+"\\Interface");
                  string addonPath5 = (GetInstallPath()+"/Interface/AddOns/");
                  string addonPath6 = (GetInstallPath()+"/Interface/AddOns");
                  string addonPath7 = (GetInstallPath()+"/Interface/");
                  string addonPath8 = (GetInstallPath()+"/Interface");

                  if (addonPath.ToLower() == directoryName.ToLower() ||
                     addonPath2.ToLower() == directoryName.ToLower() ||
                     addonPath3.ToLower() == directoryName.ToLower() ||
                     addonPath4.ToLower() == directoryName.ToLower() ||
                     addonPath5.ToLower() == directoryName.ToLower() ||
                     addonPath6.ToLower() == directoryName.ToLower() ||
                     addonPath7.ToLower() == directoryName.ToLower() ||
                     addonPath8.ToLower() == directoryName.ToLower()
                     )
                  {
                     DebugLine("Messed up addon pathing, No deletion of old addon folder will take place! (ignore if .nopatch file)");
                  }
                  else
                  {
                     DebugLine("Deleting old Addon Folder: "+directoryName);
                     try
                     {
                        RemoveReadOnly(directoryName);
                        Directory.Delete(directoryName,true);
                     }
                     catch(Exception e)
                     {
                        DebugLine("UnzipAddon: "+e.Message);
                     }
                  }
               }
               
               // create directory
               //DebugLine("Creating Directory: "+directoryName);
               //Directory.CreateDirectory(directoryName);
               DebugLine(_UNZIPPING);
            
               //if firstfile
            }

                    // create directory
                    if (!Directory.Exists(directoryName))
                    {
                        DebugLine("Creating Directory: " + directoryName);
                        Directory.CreateDirectory(directoryName);
                    }

            if (fileName != String.Empty)
            {
               string extention = Path.GetExtension(fileName).ToLower();
               if (extention != ".exe" && extention != ".com" && extention != ".jar" && extention != ".vbs" && extention != ".bat")
               {
                  FileStream streamWriter = File.Create(directoryName+@"\"+fileName);
                  int size = 2048;
                  byte[] data = new byte[2048];
                  while (true)
                  {
                     size = s.Read(data, 0, data.Length);
                     if (size > 0)
                     {
                        streamWriter.Write(data, 0, size);
                     }
                     else
                     {
                        break;
                     }
                  }
                  streamWriter.Close();
               }
            }
         }
         s.Close();
      }
User avatar
jlaplaca
WR.net Apprentice
WR.net Apprentice
 
Posts: 18
Joined: Sun Feb 18, 2007 6:03 am
Location: Rocheser,NY

Re: uu 2.6.1 + ua 0.7.5 problems with addons having subfolde

Postby MattM » Mon Feb 26, 2007 10:58 pm

Thanks a lot for the fix, I'll release 2.6.2 very shortly :thumleft:
MattM
UA/UU Developer
UA/UU Developer
Gimpy Developer
Gimpy Developer
 
Posts: 886
Joined: Tue Jul 04, 2006 9:53 pm
Location: USA

uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Postby jlaplaca » Mon Feb 26, 2007 11:01 pm

NP,

I love the work that you people are doing.

Keep up the good work.
User avatar
jlaplaca
WR.net Apprentice
WR.net Apprentice
 
Posts: 18
Joined: Sun Feb 18, 2007 6:03 am
Location: Rocheser,NY

uu 2.6.1 + ua 0.7.5 problems with addons having subfolders

Postby Tupsi » Tue Feb 27, 2007 9:11 am

working now, thanks for the fix!

found another glitch though, will make a new post for it.
Tupsi
WR.net Apprentice
WR.net Apprentice
 
Posts: 74
Joined: Fri Jul 14, 2006 5:26 pm


Return to UniUploader

Who is online

Users browsing this forum: No registered users and 1 guest

cron