# HG changeset patch # User Markus Mützel # Date 1712588931 -7200 # Node ID 31225b5d494d368a4964c5ca80d6fcd671e08e8e # Parent 1d70b16c216b35b8c7867bd8dc79515e8845d16a savepath.m: Correctly handle packages without binaries (bug #65559). * savepath.m: Remove empty strings from list of package paths. diff -r 1d70b16c216b -r 31225b5d494d scripts/path/savepath.m --- a/scripts/path/savepath.m Mon Apr 08 20:35:50 2024 +0200 +++ b/scripts/path/savepath.m Mon Apr 08 17:08:51 2024 +0200 @@ -126,6 +126,11 @@ [pkg_user, pkg_system], "uniformoutput", false)]); + ## If there are packages without binaries (or without .m files), their + ## "archprefix" (or "dir") field might be empty. Remove empty paths before + ## trying to match the regular expression in the next step. + pkg_path(cellfun (@isempty, pkg_path)) = []; + ## Rely on Octave's initialization to include the pkg path elements. for i_pkg = 1:numel (pkg_path) ## Remove all paths that are (sub-)folders of a package folder.