Minor fixes + cleanup in os2 and sys/linux
Add NOFOLLOW to os2.remove Change Dev from int to u64 and make relavant casts Fix compat64_arg_pair
This commit is contained in:
1 parent
fdd3b46c10
commit
ce1f3b34c0
5 files changed
+7
-8
No files matched your search
@@ -275,7 +275,7 @@ _remove :: proc(name: string) -> Error {
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
name_cstr := temp_cstring(name) or_return
|
||||
|
||||
if fd, errno := linux.open(name_cstr, _OPENDIR_FLAGS); errno == .NONE {
|
||||
if fd, errno := linux.open(name_cstr, _OPENDIR_FLAGS + {.NOFOLLOW}); errno == .NONE {
|
||||
linux.close(fd)
|
||||
return _get_platform_error(linux.rmdir(name_cstr))
|
||||
}
|
||||
|
||||
@@ -77,8 +77,6 @@ _mkdir_all :: proc(path: string, perm: int) -> Error {
|
||||
}
|
||||
|
||||
_remove_all :: proc(path: string) -> Error {
|
||||
DT_DIR :: 4
|
||||
|
||||
remove_all_dir :: proc(dfd: linux.Fd) -> Error {
|
||||
n := 64
|
||||
buf := make([]u8, n)
|
||||
|
||||
Reference in new issue
Block a user