# HG changeset patch # User Markus Mützel # Date 1632499084 -7200 # Node ID 3b6e0f47638170a3d46ead5e517dc150da4500f5 # Parent 37ddca7ad9cb06ad018388bd50b3bb886e5984b5 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. diff -r 37ddca7ad9cb -r 3b6e0f476381 libinterp/corefcn/load-path.cc --- 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)");