[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43431] gzip does not compress directories
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #43431] gzip does not compress directories |
Date: |
Fri, 17 Oct 2014 17:42:29 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 |
URL:
<http://savannah.gnu.org/bugs/?43431>
Summary: gzip does not compress directories
Project: GNU Octave
Submitted by: rik5
Submitted on: Fri 17 Oct 2014 10:42:28 AM PDT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
Apparently this hasn't worked correctly for a very long time. I went
backwards through versions to 3.2.4 and haven't found this to ever work.
The problem is in scripts/miscellaneous/private/__xzip__.m. I've added a note
in the code:
## FIXME: This does not work when you try to compress directories
## The resulting name is dir/.gz which is totally wrong.
movefile (cellfun (@(x) sprintf ("%s.%s", x, extension),
fnames, "uniformoutput", false), cwd);
The issue is the algorithm which moves files and directories to a temporary
directory, compresses them in-place in the temp directory, and then moves them
to the output directory. This is pretty inefficient as an algorithm, but that
is a separate issue.
The problem is that files which are compressed from say "junk" to "junk.gz"
are correctly moved. But the code attempts to create the same name for
directories as for files--so "junkdir/" becomes "junkdir/.gz".
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43431>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #43431] gzip does not compress directories,
Rik <=