octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43431] gzip does not handle directories and f


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #43431] gzip does not handle directories and files in different directories
Date: Sat, 18 Jun 2016 23:49:14 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Update of bug #43431 (project octave):

                 Summary: gzip does not compress directories => gzip does not
handle directories and files in different directories

    _______________________________________________________

Follow-up Comment #1:

gzip has a few other issues for Matlab compatibility which are kind of
related. Honestly, I think Matlab's behaviours is buggy but we should decide
what to do before "fixing" our implementation.

When FILES is a directory, we should transverse the directory to find all
files, but in such case, all files that are found by transversing directories
are moved to a single directory but I'm not sure which one yet:

All test with R2010b


>> ls -R
.:
bar  fdir1  fdir2  foo  lol

./fdir1:
fdir3  foo1  foo2  foo3

./fdir1/fdir3:
foo3  foo4

./fdir2:
foo6

## note that fdir1/foo3.gz got clobbered
>> l = gzip ('fdir1')
l = 
    'fdir1/foo1.gz'    'fdir1/foo2.gz'    'fdir1/foo3.gz'    'fdir1/foo3.gz'  
 'fdir1/foo4.gz'

## note that all files got moved into fdir1, including fdir2/foo6
>> system ('find -name ''*gz'' -exec rm ''{}'' \;');
>> l = gzip ({'fdir1', 'fdir2'})                    
l = 
    'fdir1/foo1.gz'    'fdir1/foo2.gz'    'fdir1/foo3.gz'    'fdir1/foo6.gz'  
 'fdir1/foo3.gz'    'fdir1/foo4.gz'

## How foo and bar are not moved because they are not found by transversing a
directory
>> system ('find -name ''*gz'' -exec rm ''{}'' \;');
>> l = gzip ({'foo', 'fdir1', 'bar', 'fdir2'})      
l = 
    'foo.gz'    'bar.gz'    'fdir1/foo1.gz'    'fdir1/foo2.gz'   
'fdir1/foo3.gz'    'fdir1/foo6.gz'    'fdir1/foo3.gz'    'fdir1/foo4.gz'

## I'm not sure how this happened but all files ended up in 'fdir1/fdir3'
>> system ('find -name ''*gz'' -exec rm ''{}'' \;');
>> l = gzip ({'fdir1', 'fdir1/fdir3/foo3', 'fdir2'})       
l = 

    'fdir1/fdir3/foo3.gz'    'fdir1/fdir3/foo1.gz'    'fdir1/fdir3/foo2.gz'   
'fdir1/fdir3/foo3.gz'    'fdir1/fdir3/foo6.gz'    'fdir1/fdir3/foo4.gz'



Matlab, has another weird behaviour. Even when specifying normal files only,
if they reside in different directories, they end up being moved around not
sure where:


>> l = gzip ({'foo', 'fdir1/fdir3/foo3', 'bar', 'fdir2/foo6'})
l = 
    'foo.gz'    'fdir1/fdir3/foo3.gz'    'fdir1/fdir3/bar.gz'   
'fdir1/fdir3/foo6.gz'


This is a series of weird behaviours, I'd argue bugs in Matlab. Still, what
behaviour do we want gzip to have in Octave?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43431>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]