Docking Port Alignment Indicator

Docking Port Alignment Indicator

640k Downloads

Bad ZIP format for 6.9.2.1

HebaruSan opened this issue ยท 4 comments

commented

The ZIP standard says to use / and not to use \:

   4.4.17.1 The name of the file, with optional relative path.
   The path stored MUST NOT contain a drive or
   device letter, or a leading slash.  All slashes
   MUST be forward slashes '/' as opposed to
   backwards slashes '\' for compatibility with Amiga
   and UNIX file systems etc.  If input came from standard
   input, there is no file name field.  

The latest release of DPAI has lots of backslashes:

image

Hence it has not been indexed into CKAN:

image

Previous releases were fine.
I think most times when we see this, authors report using some .NET tool to build the ZIP.

commented

I think most times when we see this, authors report using some .NET tool to build the ZIP.

Hmm, indeed, but I've been doing this for a while now for several of my mods, including DPAI. Admittedly I'm using a different PC than usual at the moment.

I didn't even know ZIP files stored an actual directory structure using slashes..

I'll look into why it's different on this PC. FWIW, this is the script I've been using:

<!-- create zip file with content of release\bin folder -->
  <Target Name="ZipRelease"
          DependsOnTargets="getversion;gettime">
    <MakeDir Directories="$(ReleaseDir)" Condition="!Exists('$(ReleaseDir)')" />
    <Delete Files="$(ReleaseDir)\DockingPortAlignmentIndicator-$(DLLVersion)*.zip" />
    <ZipDirectory Condition="Exists('$(BuildDir)')"
                  SourceDirectory="$(BuildDir)"
                  DestinationFile="$(ReleaseDir)\DockingPortAlignmentIndicator-$(DLLVersion)_$(CurrentDate).zip" />
  </Target>
commented

Ok, it seems DotNet 4.6.1 and later fixed it. Presumably my usual PC uses a later version when executing the MSBUILD (it's unrelated to the actual version used to compile the mod).

I've just spent my entire morning trying to coerce this PC to create the ZIP with forward slashes to no avail.

Anyway, will make a manual update. And will need to remember to check this for all future releases for all my mods. What a nightmare. I bleeping hate Microsoft.

commented

Fixed in release 6.9.2.2.

commented