changeset 30207:3b6e0f476381 stable

rmpath: Prevent removing the current directory from the load path (bug #61216). * libinterp/corefcn/load-path.cc (load_path::remove): Prevent removing the current directory from the load path when using relative paths.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 24 Sep 2021 17:58:04 +0200
parents 37ddca7ad9cb
children 8f61866f0f6d fe2c64849660
files libinterp/corefcn/load-path.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Tue Sep 21 13:14:31 2021 -0400
+++ b/libinterp/corefcn/load-path.cc	Fri Sep 24 17:58:04 2021 +0200
@@ -357,7 +357,7 @@
 
     if (! dir_arg.empty ())
       {
-        if (dir_arg == ".")
+        if (same_file (dir_arg, "."))
           {
             warning (R"(rmpath: can't remove "." from path)");