aboutsummaryrefslogtreecommitdiffhomepage
path: root/compat/bsd
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-09 01:12:57 +0100
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-09 01:12:57 +0100
commita886813f86f88b4b1cc874a81229b7b59d0d463a (patch)
treeb8eec4c0f1363e0aecf06651bcb9b9230e1e677c /compat/bsd
parent4aaff7294131552be8c731e2f4d230106a1149f7 (diff)
fixed rub out of file writes to non-existing symlinksHEADmaster-fmsbw-cimaster
* teco_file_get_absolute_path() does not currently guarantee to resolve non-existent parts of the path. When opening a symbolic link to a non-existing file, it would only be created when writing out the file. The undo token to remove it, however would remove the original unresolved path. When rubbing out the EW, the symlink would get removed instead of the newly written file. * We now resolve/canonicalize the path again immediately after opening the new file, which should ensure that it resolves. * As an alternative, we might have also tried to reliably canonicalize non-existent symlinks. This however is tricky and there would have to be a break condition to guard against cyclic symlinke. In the end there is no guarantee to be able to resolve a path exactly like the OS does. Therefore, teco_file_get_absolute_path() was not touched, not even on UNIX. * A test case was not added since it would rely on creating real symlinks. It wouldn't work on MSYS when `ln -s` falls back to hardlinks. Perhaps other non-UNIX platforms would have similar restrictions.
Diffstat (limited to 'compat/bsd')
0 files changed, 0 insertions, 0 deletions