Issue Details (XML | Word | Printable)

Key: IZPACK-308
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Florian Buehlmann
Reporter: Florian Buehlmann
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IzPack

Loose pack do not work if installation is startet from UNC path

Created: 27/Feb/09 01:53 AM   Updated: 20/Apr/09 03:26 AM   Resolved: 27/Feb/09 05:08 AM
Return to search
Component/s: Installer
Affects Version/s: 4.2.1
Fix Version/s: 4.3.0

Time Tracking:
Not Specified

File Attachments: 1. Text File IZPACK-308-Alternative1.patch (2 kB)
2. Text File IZPACK-308-Alternative2.patch (2 kB)
3. Text File IZPACK-308-Alternative3.patch (2 kB)



 Description  « Hide

If the installation files are on a file server and the installation is startet over the UNC path like java -jar \\server\install_files\setup.jar the loose pack files are not found.



Florian Buehlmann made changes - 27/Feb/09 01:53 AM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Florian Buehlmann made changes - 27/Feb/09 05:07 AM
Status In Progress [ 3 ] Open [ 1 ]
Florian Buehlmann added a comment - 27/Feb/09 05:08 AM

Loose packs are now working if the installation is started from a UNC path.


Florian Buehlmann made changes - 27/Feb/09 05:08 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Christian d'Heureuse added a comment - 22/Mar/09 05:19 PM

Florian, I run into this problem with Windows UNC paths with IzPack 4.2.1 and I started to write a patch before I saw your Jira entry and your patch.

I don't like how the special case of Windows UNC paths are handled in your patch. I have developed 3 alternative patches. Please have a look at them.

Patch 1 makes minimal changes to the original code by using the URI class instead of the URL class.

Patch 2 is an improvement to patch 1, to avoid creating a File object that contains a "!" within the path and a last path component ("info") within the JAR file. This could be a problem in some operating systems or in future or alternative Java implementations.

Patch 3 uses getProtectionDomain() instead of getResource() to find the path of the JAR file. This has the advantage of not having to extract the nested "file:" URL out of the outer "jar:" URL.

All three alternative patches don't need extra code to handle Windows UNC paths and should be more portable and future-proof than the current solution.


Christian d'Heureuse made changes - 22/Mar/09 05:19 PM
Attachment IZPACK-308-Alternative3.patch [ 40857 ]
Attachment IZPACK-308-Alternative2.patch [ 40856 ]
Attachment IZPACK-308-Alternative1.patch [ 40855 ]
Christian d'Heureuse added a comment - 22/Mar/09 06:21 PM

Related: IZPACK-347


Florian Buehlmann added a comment - 23/Mar/09 02:46 AM

Christian thanks for the patch. Your solution is really better than mine. I change the code to be more flexible for the future.


Julien Ponge made changes - 20/Apr/09 03:26 AM
Status Resolved [ 5 ] Closed [ 6 ]