Commit 8c778cd
committed
fix(extractor): do not use Path.readlink to check for empty targets
We cannot use Path.readlink to check if the symlink target is
not set (that happens with f_badsymlinks.img on Darwin systems, you need
a broken filesystem and an OS that supports it).
That's because Path.readlink returns a Path object with an empty name
(i.e. Path("")), which is indiscernable from a symlink target that is
the current directory (i.e. Path(".")). Since there is no difference
between Path("") and Path("."), we can't differentiate between a symlink
with an empty target and a symlink that points at the current directory.1 parent 162cca4 commit 8c778cd
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments