diff scripts/pkg/private/install.m @ 27573:0cedd1e23c1f

Adapt path styles for pkg.m on Windows (bug #57083) Change 8.3-style paths into LFN paths before writing octave-packages files * standardize_paths.m: New function that converts 8.3-style paths to LFN paths with canonicalize_file_name(). * scripts/pkg/module.mk: Add standardize_paths.m to build system. * pkg.m, install.m, uninstall.m: On Windows (ispc == true) platforms, call standardize_paths to create unique pathnames for globalk_packages and local_packages lists. * installed_packages.m: Remove unnecessary calls to strrep() which were previously used to standardize pathnames.
author Philip Nienhuis <prnienhuis@users.sf.net>
date Sat, 26 Oct 2019 21:51:41 +0200
parents 29ccef7e5295
children 377f069841c1
line wrap: on
line diff
--- a/scripts/pkg/private/install.m	Sun Oct 27 10:59:53 2019 -0700
+++ b/scripts/pkg/private/install.m	Sat Oct 26 21:51:41 2019 +0200
@@ -257,11 +257,18 @@
     if (global_install)
       idx = setdiff (1:length (global_packages), packages_to_uninstall);
       global_packages = save_order ({global_packages{idx}, descriptions{:}});
+      if (ispc)
+        ## On Windows ensure LFN paths are saved rather than 8.3 style paths
+        global_packages = standardize_paths (global_packages);
+      endif
       save (global_list, "global_packages");
       installed_pkgs_lst = {local_packages{:}, global_packages{:}};
     else
       idx = setdiff (1:length (local_packages), packages_to_uninstall);
       local_packages = save_order ({local_packages{idx}, descriptions{:}});
+      if (ispc)
+        local_packages = standardize_paths (local_packages);
+      endif
       save (local_list, "local_packages");
       installed_pkgs_lst = {local_packages{:}, global_packages{:}};
     endif