[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a direc
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows |
Date: |
Sat, 02 Apr 2016 22:40:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38 |
URL:
<http://savannah.gnu.org/bugs/?47609>
Summary: zip.m: errrors when zipping to a directory with
spaces in name on Windows
Project: GNU Octave
Submitted by: philipnienhuis
Submitted on: Sun 03 Apr 2016 12:40:23 AM CEST
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Philip Nienhuis
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Microsoft Windows
_______________________________________________________
Details:
Some investigation after bug #47578 shows the following:
Files to zip are in:
C:\Users\philip\AppData\Local\Temp\oct-dIRfU3
File to zip to:
c:\tmp\spaces in name\test.zip
flist = zip ("test.zip", "*.*",
'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3')
## Works partly. zip apparently does not understand the traditional Windows
wildcard *.*.
## It only copied the one file in the root of ....\oct-dIRfU3 but not the
subdirs
flist = zip ("test.zip", "*",
'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3')
## This works fine
flist = zip ("spaces in name/test.zip",
'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3\*')
## Does not work at all:
error: zip: zip failed with exit status = 127
error: called from
zip at line 72 column 5
flist = zip ("spaces in name/test.zip",
'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3\*.*')
## Same, does not work
flist = zip ("spaces in name/test.zip",
'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3\')
## Same, does not work
Debugging zip.m:
## from within c:\tmp\spaces in name\
flist = zip ("test.zip", 'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3\*')
:
## At L.68
debug> cmd
cmd = zip -r 'C:\tmp\spaces in name\test.zip'
C:\Users\philip\AppData\Local\Temp
\oct-dIRfU3\*
debug> [status, output] = system (cmd) ## Run from editor with F9
status = 127
output = zip warning: name not matched:
C:/Users/philip/AppData/Local/Temp
/oct-dIRfU3/*
zip error: Nothing to do! (try: zip -r C:\tmp\spaces in name\test.zip . -i
C:\Use
rs\philip\AppData\Local\Temp\oct-dIRfU3\*)
:
:
## Changing backslashes to forward slashes
debug> cmd = strrep (cmd, '\', '/')
cmd = zip -r 'C:/tmp/spaces in name/test.zip'
C:/Users/philip/AppData/Local/Temp
/oct-dIRfU3/*
debug> [status, output] = system (cmd)
Local/Temp/oct-dIRfU3/[Content_Types].xml (deflated 69%)
p/oct-dIRfU3/_rels/ (stored 0%)
p/oct-dIRfU3/_rels/.rels (deflated 60%)
p/oct-dIRfU3/docProps/ (stored 0%)
p/oct-dIRfU3/docProps/app.xml (deflated 51%)
:
Conclusions:
- In zip.m, Windows users should be informed that the "*.*" wildcard doesn't
work as expected on Windows, they should use "*" instead;
- Ditto, the FILES argument should have forward slash fileseps; or zip.m
itself should take care that it conveys forward slash fileseps to zip.
I'll upload a changeset to accomplish both these points when I have the bug
number.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47609>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Philip Nienhuis, 2016/04/02
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Mike Miller, 2016/04/03
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Mike Miller, 2016/04/03
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Philip Nienhuis, 2016/04/03
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Mike Miller, 2016/04/03
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Philip Nienhuis, 2016/04/03
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Mike Miller, 2016/04/03
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Philip Nienhuis, 2016/04/04
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Rik, 2016/04/04
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Mike Miller, 2016/04/04