mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Fix some additional Windows TTY issues
This commit is contained in:
parent
f26a280cda
commit
1694edf85c
12 changed files with 107 additions and 43 deletions
|
@ -53,16 +53,6 @@ static textwindows int64_t sys_open_nt_impl(int dirfd, const char *path,
|
|||
return kNtInvalidHandleValue;
|
||||
}
|
||||
|
||||
// strip trailing slash
|
||||
size_t n = strlen16(path16);
|
||||
if (n > 1 && path16[n - 1] == '\\') {
|
||||
// path denormalization only goes so far. when a trailing / or /.
|
||||
// exists the kernel interprets that as having O_DIRECTORY intent
|
||||
// furthermore, windows will throw an error on unc paths with it!
|
||||
flags |= O_DIRECTORY;
|
||||
path16[--n] = 0;
|
||||
}
|
||||
|
||||
// implement no follow flag
|
||||
// you can't open symlinks; use readlink
|
||||
// this flag only applies to the final path component
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue