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

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

[Octave-bug-tracker] [bug #47232] zip fails if filename has whitespace


From: Rik
Subject: [Octave-bug-tracker] [bug #47232] zip fails if filename has whitespace
Date: Mon, 29 Feb 2016 20:05:09 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #10, bug #47232 (project octave):

Support for fork() is sketchy on all operating system other than Linux.  Even
Macs, based on FreeBSD, have some issues.  I'd be scared of going down that
path.

What about just escaping the quote characters if necessary?

I used the following code in zip.m


  files = glob (files);                   # to expand wildcards
  files = regexprep (files, '"', '\\"');  # to escape double quotes
  cmd = sprintf ('zip -r "%s" %s', zipfile, sprintf (' "%s"', files{:}));


I then ran it in a directory with these file names


simple test2
simple test1
this file "has a quote" in it


The code below ran fine and I verifed the zip archive.


zip ('my.zip', {'simple*', 'this file*'})





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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