[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:53:37 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38 |
Follow-up Comment #1, bug #47609 (project octave):
It seems the bugreport didn't get uploaded in the form I hoped it would be
:-(
Another try:
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. dir 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\*')
error: zip: zip failed with exit status = 127
error: called from
zip at line 72 column 5
Does not work at all.
flist = zip ("spaces in name/test.zip",
'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3\*.*')
flist = zip ("spaces in name/test.zip",
'C:\Users\philip\AppData\Local\Temp\oct-dIRfU3\')
Same, don't 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 "*.*" wildcard doesn't
work as expected on Windows, they should use "*" instead;
- Ditto, the FILES argument should have forward slash fileseps
Changeset for these two attached.
(file #36825)
_______________________________________________________
Additional Item Attachment:
File name: bug_47609.cset Size:1 KB
_______________________________________________________
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, 2016/04/02
- [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, 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
- [Octave-bug-tracker] [bug #47609] zip.m: errrors when zipping to a directory with spaces in name on Windows, Philip Nienhuis, 2016/04/04