Problem with removing directories containing soft links on MSYS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with removing directories containing soft links on MSYS

Volo Zyko
The following list of bash commands ends with fail at least on MSYS
(don't know about Cygwin).

$> test_dir=$PWD/cmake

$> mkdir -p $test_dir/1
$> ln -s $test_dir/1/ $test_dir/a

$> cmake -E remove_directory $test_dir

Final CMake invocation reports: Error removing directory "C:/cmake".
It looks like cmake first removes "$test_dir/1" and then cannot remove
dangling "$test_dir/a". Is this something known?

 Volo Zyko
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Problem with removing directories containing soft links on MSYS

Volo Zyko
Additionally investigated that the following also fails:

$> test_dir=$PWD/cmake

$> mkdir -p $test_dir/z
$> ln -s $test_dir/z/ $test_dir/a

$> cmake -E remove_directory $test_dir

In this case $test_dir/z is not removed at all.

Also, I checked cmake 3.5.1 and 3.9.2.

 Volo Zyko


On Thu, Dec 7, 2017 at 4:35 PM, Volo Zyko <[hidden email]> wrote:

> The following list of bash commands ends with fail at least on MSYS
> (don't know about Cygwin).
>
> $> test_dir=$PWD/cmake
>
> $> mkdir -p $test_dir/1
> $> ln -s $test_dir/1/ $test_dir/a
>
> $> cmake -E remove_directory $test_dir
>
> Final CMake invocation reports: Error removing directory "C:/cmake".
> It looks like cmake first removes "$test_dir/1" and then cannot remove
> dangling "$test_dir/a". Is this something known?
>
>  Volo Zyko
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake