changeset 30931:1e7a33a0e586

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 12 Apr 2022 17:15:31 +0200
parents c5284aceb80b (current diff) f67d2ce5d6d4 (diff)
children b6fb3e2a2024
files
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Mon Apr 11 18:42:33 2022 +0200
+++ b/scripts/pkg/pkg.m	Tue Apr 12 17:15:31 2022 +0200
@@ -696,6 +696,10 @@
           global_packages = standardize_paths (global_packages);
         endif
         global_packages = make_rel_paths (global_packages);
+        global_list_dir = fileparts (global_list);
+        if (! isempty (global_list_dir) && ! exist (global_list_dir, "dir"))
+          mkdir (global_list_dir);
+        endif
         save (global_list, "global_packages");
         if (nargout)
           local_packages = global_packages;
@@ -707,6 +711,10 @@
         if (ispc)
           local_packages = standardize_paths (local_packages);
         endif
+        local_list_dir = fileparts (local_list);
+        if (! isempty (local_list_dir) && ! exist (local_list_dir, "dir"))
+          mkdir (local_list_dir);
+        endif
         save (local_list, "local_packages");
         if (! nargout)
           clear ("local_packages");