Mercurial > octave-nkf
diff 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 |
line wrap: on
line diff
--- a/scripts/miscellaneous/unpack.m Mon Mar 16 11:51:35 2015 -0700 +++ b/scripts/miscellaneous/unpack.m Tue Mar 17 20:56:47 2015 +0100 @@ -190,6 +190,11 @@ nodotext = ext(ext != '.'); endif + if (ispc && strcmp (nodotext, "tar")) + ## Change file pathname into a mingw style acceptable for tar + file = __w2mpth__ (file); + endif + if (isfield (commandlist, tolower (nodotext))) [commandv, commandq, parsefcn, move] = deal (commandlist.(nodotext){:}); origdir = pwd (); @@ -198,8 +203,8 @@ else startdir = origdir; endif - cstartdir = canonicalize_file_name (startdir); - cenddir = canonicalize_file_name (dir); + cstartdir = make_absolute_filename (startdir); + cenddir = make_absolute_filename (dir); needmove = move && ! strcmp (cstartdir, cenddir); if (nargout > 0 || needmove) command = commandv;