Mercurial > octave-nkf
comparison scripts/miscellaneous/unpack.m @ 19986:8c20fb6caa16
Fix XFAIL with tar and unpack tests (bug #44007, bug #43979).
* tar.m: On Windows, convert full Windows path name to msys style.
* unpack.m: ditto, and use make_absolute_filename rather than
canonicalize_file_name.
* private/__w2mpth__.m: New function, converts Windows style path to msys style.
author | Philip Nienhuis <prnienhuis@users.sf.net> |
---|---|
date | Tue, 17 Mar 2015 20:56:47 +0100 |
parents | 0cc365dada52 |
children | df437a52bcaf |
comparison
equal
deleted
inserted
replaced
19985:e75a0fe1eee2 | 19986:8c20fb6caa16 |
---|---|
188 nodotext = "zip"; | 188 nodotext = "zip"; |
189 else | 189 else |
190 nodotext = ext(ext != '.'); | 190 nodotext = ext(ext != '.'); |
191 endif | 191 endif |
192 | 192 |
193 if (ispc && strcmp (nodotext, "tar")) | |
194 ## Change file pathname into a mingw style acceptable for tar | |
195 file = __w2mpth__ (file); | |
196 endif | |
197 | |
193 if (isfield (commandlist, tolower (nodotext))) | 198 if (isfield (commandlist, tolower (nodotext))) |
194 [commandv, commandq, parsefcn, move] = deal (commandlist.(nodotext){:}); | 199 [commandv, commandq, parsefcn, move] = deal (commandlist.(nodotext){:}); |
195 origdir = pwd (); | 200 origdir = pwd (); |
196 if (move) | 201 if (move) |
197 startdir = fileparts (file); | 202 startdir = fileparts (file); |
198 else | 203 else |
199 startdir = origdir; | 204 startdir = origdir; |
200 endif | 205 endif |
201 cstartdir = canonicalize_file_name (startdir); | 206 cstartdir = make_absolute_filename (startdir); |
202 cenddir = canonicalize_file_name (dir); | 207 cenddir = make_absolute_filename (dir); |
203 needmove = move && ! strcmp (cstartdir, cenddir); | 208 needmove = move && ! strcmp (cstartdir, cenddir); |
204 if (nargout > 0 || needmove) | 209 if (nargout > 0 || needmove) |
205 command = commandv; | 210 command = commandv; |
206 else | 211 else |
207 command = commandq; | 212 command = commandq; |