Difference to unzip/Explorer in handling of empty directory name
Downloaded a zip from a dropbox account (probably dropbox generated) that contained a directory which exhibited a strange behaviour in file-roller vs. unzip.
It's a zero byte entry named "/", which I guess is a directory with an empty name (without detailed knowledge of the zip format specification). If such an entry is even allowed or the purpose of it I cannot imagine. Not able to resist the urge to quickly dig at it, a random spec which seems legit and recent suggests (paragraph; "4.4.17 file name: (Variable)") that it is not; "The path stored MUST NOT contain a drive or device letter, or a leading slash."
Comparing the output of file-roller vs. unzip in a one-liner;
$ rm -r file-roller/ unzip/; unzip -l Gratis\ downloads.zip; mkdir file-roller ;(cd file-roller; file-roller -e . ../Gratis\ downloads.zip); mkdir unzip; (cd unzip; unzip ../Gratis\ downloads.zip); diff -r file-roller/ unzip/
Archive: Gratis downloads.zip
Length Date Time Name
--------- ---------- ----- ----
0 2018-01-01 11:02 /
73140541 2014-06-12 10:44 ListenLouder-lydbog.mp3
6036348 2014-04-14 07:51 Listen Louder-PDF.pdf
2431293 2014-04-26 11:33 ListenLouder-ebog.epub
--------- -------
81608182 4 files
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Archive: ../Gratis downloads.zip
warning: stripped absolute path spec from /
mapname: conversion of failed
inflating: ListenLouder-lydbog.mp3
inflating: Listen Louder-PDF.pdf
inflating: ListenLouder-ebog.epub
Only in file-roller/: Gratis downloads
$
- file-roller: interprets the entry as a directory by the name of the archive (without zip extension), also seen as such in UI
- unzip: barkingly skips the entry
- Windows 10 Explorer: skips the entry
If needed the file can be fetched (~80 MiB) from menu "Download->Direct download" at: https://www.dropbox.com/sh/27zcaij4kzuqmgb/AACLoAVpnIkKUKqEZhS9kJCVa?dl=0
$ file-roller --version
file-roller 3.16.5, Copyright © 2001-2012 Free Software Foundation, Inc.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial