IzPack

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 4.2.1
  • Fix Version/s: 4.3.0
  • Component/s: Installer
  • Labels:
    None
  • Number of attachments :
    3

Description

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.

  1. IZPACK-308-Alternative1.patch
    22/Mar/09 5:19 PM
    2 kB
    Christian d'Heureuse
  2. IZPACK-308-Alternative2.patch
    22/Mar/09 5:19 PM
    2 kB
    Christian d'Heureuse
  3. IZPACK-308-Alternative3.patch
    22/Mar/09 5:19 PM
    2 kB
    Christian d'Heureuse

Activity

Hide
Florian Buehlmann added a comment -

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

Show
Florian Buehlmann added a comment - Loose packs are now working if the installation is started from a UNC path.
Hide
Christian d'Heureuse added a comment -

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.

Show
Christian d'Heureuse added a comment - 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.
Hide
Christian d'Heureuse added a comment -

Related: IZPACK-347

Show
Christian d'Heureuse added a comment - Related: IZPACK-347
Hide
Florian Buehlmann added a comment -

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

Show
Florian Buehlmann added a comment - Christian thanks for the patch. Your solution is really better than mine. I change the code to be more flexible for the future.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: