changeset 16173:40a9a4e0d12a

pkg.m: Restore ability to use '~' in specifying prefix directories. * scripts/pkg/pkg.m: Call tilde_expand() on user input before canonicalize_file_name().
author Rik <rik@octave.org>
date Sat, 02 Mar 2013 07:59:25 -0800
parents d235ca65c9a9
children 39096b290a2f
files scripts/pkg/pkg.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Sat Mar 02 07:51:08 2013 -0800
+++ b/scripts/pkg/pkg.m	Sat Mar 02 07:59:25 2013 -0800
@@ -423,7 +423,7 @@
         local_packages = prefix;
         global_packages = archprefix;
       elseif (length (files) >= 1 && nargout <= 2 && ischar (files{1}))
-        prefix = files{1};
+        prefix = tilde_expand (files{1});
         if (! exist (prefix, "dir"))
           [status, msg, msgid] = mkdir (prefix);
           if (status == 0)
@@ -434,7 +434,7 @@
         local_packages = prefix = canonicalize_file_name (prefix);
         user_prefix = true;
         if (length (files) >= 2 && ischar (files{2}))
-          archprefix = files{2};
+          archprefix = tilde_expand (files{2});
           if (! exist (archprefix, "dir"))
             [status, msg, msgid] = mkdir (archprefix);
             if (status == 0)