Commit 714eaea
authored
[FS] lookupPath should throw an error on an empty string (#23366)
It's inconsistent that lookupPath returns `node:null` when the path is
an empty string. Normally it either raises `ENOENT` or `node` is truthy.
This makes empty string into an edge case that every caller has to
handle. `stat` has special handling for the empty string case and
correctly returns ENOENT on empty string, but chmod, truncate, and mknod
all crash. utime and some other functions mishandle the empty string in
an unrelated way.1 parent 5ac384b commit 714eaea
File tree
25 files changed
+44
-22
lines changed- src
- test
- other/codesize
- stat
- unistd
- utime
25 files changed
+44
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
952 | 954 | | |
953 | 955 | | |
954 | 956 | | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | 957 | | |
959 | 958 | | |
960 | 959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments