Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIP File Uses Wrong Directory Separator #2

Closed
nomad64 opened this issue Nov 19, 2022 · 4 comments
Closed

ZIP File Uses Wrong Directory Separator #2

nomad64 opened this issue Nov 19, 2022 · 4 comments

Comments

@nomad64
Copy link

nomad64 commented Nov 19, 2022

The ZIP file for this mod (and a few other OCB mods I have used) have the wrong directory separator. This causes issues when extracting the files on a non-Windows platform. I am not sure how you package the ZIP archives, but this is most commonly caused by older versions of Powershell.

Some programs account for this, while others do not. For example, if I extract the archive using the GUI Archive Manager program on my Linux Mint desktop, I get the following directory structure:

$ ls -la
total 2024
drwxr-xr-x 3 nomad64 nomad64    4096 Nov 19 08:13  .
drwxrwxr-x 4 nomad64 nomad64    4096 Nov 19 08:13  ..
-rw-rw-r-- 1 nomad64 nomad64   22528 May 21 02:46 'OcbClaimAutoRepair\ClaimAutoRepair.dll'
-rw-rw-r-- 1 nomad64 nomad64     753 May 21 02:46 'OcbClaimAutoRepair\Config\blocks.a20.xml'
-rw-rw-r-- 1 nomad64 nomad64    1277 May 21 02:46 'OcbClaimAutoRepair\Config\blocks.ulm.xml'
-rw-rw-r-- 1 nomad64 nomad64    1544 May 21 02:46 'OcbClaimAutoRepair\Config\blocks.xml'
-rw-rw-r-- 1 nomad64 nomad64     732 May 21 02:46 'OcbClaimAutoRepair\Config\items.xml'
-rw-rw-r-- 1 nomad64 nomad64     713 May 21 02:46 'OcbClaimAutoRepair\Config\Localization.txt'
-rw-rw-r-- 1 nomad64 nomad64     444 May 21 02:46 'OcbClaimAutoRepair\Config\loot.xml'
-rw-rw-r-- 1 nomad64 nomad64     368 May 21 02:46 'OcbClaimAutoRepair\Config\progression.xml'
-rw-rw-r-- 1 nomad64 nomad64     511 May 21 02:46 'OcbClaimAutoRepair\Config\recipes.a20.xml'
-rw-rw-r-- 1 nomad64 nomad64    1422 May 21 02:46 'OcbClaimAutoRepair\Config\recipes.ulm.xml'
-rw-rw-r-- 1 nomad64 nomad64     193 May 21 02:46 'OcbClaimAutoRepair\Config\recipes.xml'
-rw-rw-r-- 1 nomad64 nomad64     315 May 21 02:46 'OcbClaimAutoRepair\ModInfo.xml'
-rw-rw-r-- 1 nomad64 nomad64    5904 May 21 02:46 'OcbClaimAutoRepair\README.md'
-rw-rw-r-- 1 nomad64 nomad64 1677222 May 21 02:46 'OcbClaimAutoRepair\Resources\ClaimAutoRepair.unity3d'
drwx------ 2 nomad64 nomad64    4096 May 21 02:46 'OcbClaimAutoRepair\UIAtlases\'
-rw-rw-r-- 1 nomad64 nomad64  301820 May 21 02:46 'OcbClaimAutoRepair\UIAtlases\ItemIconAtlas\ClaimAutoRepair.png'

However, if I use unzip on the command line, it extracts fine.

$ unzip OcbClaimAutoRepair-0.7.5.zip 
Archive:  OcbClaimAutoRepair-0.7.5.zip
warning:  OcbClaimAutoRepair-0.7.5.zip appears to use backslashes as path separators
   creating: OcbClaimAutoRepair/UIAtlases/
  inflating: OcbClaimAutoRepair/ClaimAutoRepair.dll  
  inflating: OcbClaimAutoRepair/ModInfo.xml  
  inflating: OcbClaimAutoRepair/README.md  
  inflating: OcbClaimAutoRepair/Config/blocks.a20.xml  
  inflating: OcbClaimAutoRepair/Config/blocks.ulm.xml  
  inflating: OcbClaimAutoRepair/Config/blocks.xml  
  inflating: OcbClaimAutoRepair/Config/items.xml  
  inflating: OcbClaimAutoRepair/Config/Localization.txt  
  inflating: OcbClaimAutoRepair/Config/loot.xml  
  inflating: OcbClaimAutoRepair/Config/progression.xml  
  inflating: OcbClaimAutoRepair/Config/recipes.a20.xml  
  inflating: OcbClaimAutoRepair/Config/recipes.ulm.xml  
  inflating: OcbClaimAutoRepair/Config/recipes.xml  
  inflating: OcbClaimAutoRepair/Resources/ClaimAutoRepair.unity3d  
  inflating: OcbClaimAutoRepair/UIAtlases/ItemIconAtlas/ClaimAutoRepair.png  
$ cd OcbClaimAutoRepair/
$ ls -la
total 56
drwxrwxr-x 5 nomad64 nomad64  4096 Nov 19 08:09 ./
drwxrwxr-x 3 nomad64 nomad64  4096 Nov 19 08:09 ../
-rw-rw-r-- 1 nomad64 nomad64 22528 May 21 01:46 ClaimAutoRepair.dll
drwxrwxr-x 2 nomad64 nomad64  4096 Nov 19 08:09 Config/
-rw-rw-r-- 1 nomad64 nomad64   315 May 21 01:46 ModInfo.xml
-rw-rw-r-- 1 nomad64 nomad64  5904 May 21 01:46 README.md
drwxrwxr-x 2 nomad64 nomad64  4096 Nov 19 08:09 Resources/
drw-rw-r-- 3 nomad64 nomad64  4096 May 21 01:46 UIAtlases/
@mgreter
Copy link
Contributor

mgreter commented Nov 19, 2022

They are in fact packed with CI/CD pipeline which does use the powershell zip thingy, as that one is included on the CI/CD pipeline within GitHub. Will check and, if confirmed, will probably have to find another archive utility to do the packing then ...
For future reference: PowerShell/Microsoft.PowerShell.Archive#62

@mgreter mgreter transferred this issue from OCB7D2D/OcbClaimAutoRepair Nov 19, 2022
@mgreter
Copy link
Contributor

mgreter commented Nov 19, 2022

@nomad64 Can you verify that this archive OcbClaimAutoRepair-0.0.0.zip is now correctly formatted? Thx!

@nomad64
Copy link
Author

nomad64 commented Nov 19, 2022

@mgreter Yes, that archive is correctly formatted and no longer throws a warning message when unzipped via CLI:

$ unzip OcbClaimAutoRepair-0.0.0.zip 
Archive:  OcbClaimAutoRepair-0.0.0.zip
   creating: OcbClaimAutoRepair/UIAtlases/
  inflating: OcbClaimAutoRepair/ClaimAutoRepair.dll  
  inflating: OcbClaimAutoRepair/ModInfo.xml  
  inflating: OcbClaimAutoRepair/README.md  
  inflating: OcbClaimAutoRepair/Config/blocks.a20.xml  
  inflating: OcbClaimAutoRepair/Config/blocks.ulm.xml  
  inflating: OcbClaimAutoRepair/Config/blocks.xml  
  inflating: OcbClaimAutoRepair/Config/items.xml  
  inflating: OcbClaimAutoRepair/Config/Localization.txt  
  inflating: OcbClaimAutoRepair/Config/loot.xml  
  inflating: OcbClaimAutoRepair/Config/progression.xml  
  inflating: OcbClaimAutoRepair/Config/recipes.a20.xml  
  inflating: OcbClaimAutoRepair/Config/recipes.ulm.xml  
  inflating: OcbClaimAutoRepair/Config/recipes.xml  
  inflating: OcbClaimAutoRepair/Resources/ClaimAutoRepair.unity3d  
  inflating: OcbClaimAutoRepair/UIAtlases/ItemIconAtlas/ClaimAutoRepair.png  
$ ls -la
total 3932
drwxrwxr-x 5 nomad64 nomad64    4096 Nov 19 11:22 ./
drwxr-xr-x 7 nomad64 nomad64    4096 Nov 19 11:22 ../
drwxrwxr-x 5 nomad64 nomad64    4096 Nov 19 11:22 OcbClaimAutoRepair/
-rw-rw-r-- 1 nomad64 nomad64 1999352 Nov 19 11:21 OcbClaimAutoRepair-0.0.0.zip
drwxr-xr-x 3 nomad64 nomad64    4096 Nov 19 08:13 OcbClaimAutoRepair-0.7.5/
drwxrwxr-x 5 nomad64 nomad64    4096 Nov 19 08:09 OcbClaimAutoRepair-0.7.5-unzip/
-rw-rw-r-- 1 nomad64 nomad64 1999239 Nov 19 07:55 OcbClaimAutoRepair-0.7.5.zip

Extracting it via the same GUI archive manager produces the correct directory structure (renamed below):

$ ls -laR OcbClaimAutoRepair-0.0.0-gui/
OcbClaimAutoRepair-0.0.0-gui/:
total 56
drwx------ 5 nomad64 nomad64  4096 Nov 19 11:23 .
drwxrwxr-x 6 nomad64 nomad64  4096 Nov 19 11:23 ..
-rw-rw-r-- 1 nomad64 nomad64 22528 Nov 19  2022 ClaimAutoRepair.dll
drwx------ 2 nomad64 nomad64  4096 Nov 19 11:23 Config
-rw-rw-r-- 1 nomad64 nomad64   315 Nov 19  2022 ModInfo.xml
-rw-rw-r-- 1 nomad64 nomad64  5904 Nov 19  2022 README.md
drwx------ 2 nomad64 nomad64  4096 Nov 19 11:23 Resources
drwx------ 3 nomad64 nomad64  4096 Nov 19  2022 UIAtlases

OcbClaimAutoRepair-0.0.0-gui/Config:
total 48
drwx------ 2 nomad64 nomad64 4096 Nov 19 11:23 .
drwx------ 5 nomad64 nomad64 4096 Nov 19 11:23 ..
-rw-rw-r-- 1 nomad64 nomad64  753 Nov 19  2022 blocks.a20.xml
-rw-rw-r-- 1 nomad64 nomad64 1277 Nov 19  2022 blocks.ulm.xml
-rw-rw-r-- 1 nomad64 nomad64 1544 Nov 19  2022 blocks.xml
-rw-rw-r-- 1 nomad64 nomad64  732 Nov 19  2022 items.xml
-rw-rw-r-- 1 nomad64 nomad64  914 Nov 19  2022 Localization.txt
-rw-rw-r-- 1 nomad64 nomad64  444 Nov 19  2022 loot.xml
-rw-rw-r-- 1 nomad64 nomad64  368 Nov 19  2022 progression.xml
-rw-rw-r-- 1 nomad64 nomad64  511 Nov 19  2022 recipes.a20.xml
-rw-rw-r-- 1 nomad64 nomad64 1422 Nov 19  2022 recipes.ulm.xml
-rw-rw-r-- 1 nomad64 nomad64  193 Nov 19  2022 recipes.xml

OcbClaimAutoRepair-0.0.0-gui/Resources:
total 1648
drwx------ 2 nomad64 nomad64    4096 Nov 19 11:23 .
drwx------ 5 nomad64 nomad64    4096 Nov 19 11:23 ..
-rw-rw-r-- 1 nomad64 nomad64 1677222 Nov 19  2022 ClaimAutoRepair.unity3d

OcbClaimAutoRepair-0.0.0-gui/UIAtlases:
total 12
drwx------ 3 nomad64 nomad64 4096 Nov 19  2022 .
drwx------ 5 nomad64 nomad64 4096 Nov 19 11:23 ..
drwx------ 2 nomad64 nomad64 4096 Nov 19 11:23 ItemIconAtlas

OcbClaimAutoRepair-0.0.0-gui/UIAtlases/ItemIconAtlas:
total 304
drwx------ 2 nomad64 nomad64   4096 Nov 19 11:23 .
drwx------ 3 nomad64 nomad64   4096 Nov 19  2022 ..
-rw-rw-r-- 1 nomad64 nomad64 301820 Nov 19  2022 ClaimAutoRepair.png

@mgreter
Copy link
Contributor

mgreter commented Nov 20, 2022

Thx for confirming. The archives will get that fix one after another when a new version is released. I don't think it merits an update for each end every mod right away, but future releases for any of my mods should include that compatibility fix!

@mgreter mgreter closed this as completed Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants