dont-confuse-a-xyz.lnk-directory-for-a-lnk-file-cygwin-v1
dscho
tagged this
17 Jan 20:19
When trying to create a directory called `xyz` in the presence of a directory `xyz.lnk`, the Cygwin runtime errors out with an `ENOENT`. The root cause is actually a bit deeper: the `symlink_info::check()` method tries to figure out whether the given path refers to a symbolic link as emulated via `.lnk` files, but since it is a directory, that is not the case, and that hypothesis is rejected. However, the `fileattr` field is not cleared, so that a later `.exists()` call on the instance mistakenly thinks that the symlink actually exists. Let's clear that field. This fixes https://github.com/msys2/msys2-runtime/issues/81 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Submitted-As: https://public-inbox.org/git/e4230b2bc45903850a4007c6f556bffe1507cc9e.1642450788.git.johannes.schindelin@gmx.de
Assets 2
-
2022-01-17T20:19:50Z -
2022-01-17T20:19:50Z -