mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: update chmod/chdir usages
This commit is contained in:
@ -478,11 +478,11 @@ fn test_is_executable_writable_readable() {
|
||||
}
|
||||
f.close()
|
||||
$if !windows {
|
||||
os.chmod(file_name, 0o600) // mark as readable && writable, but NOT executable
|
||||
os.chmod(file_name, 0o600) or {} // mark as readable && writable, but NOT executable
|
||||
assert os.is_writable(file_name)
|
||||
assert os.is_readable(file_name)
|
||||
assert !os.is_executable(file_name)
|
||||
os.chmod(file_name, 0o700) // mark as executable too
|
||||
os.chmod(file_name, 0o700) or {} // mark as executable too
|
||||
assert os.is_executable(file_name)
|
||||
} $else {
|
||||
assert os.is_writable(file_name)
|
||||
@ -640,7 +640,7 @@ fn test_posix_set_bit() {
|
||||
} $else {
|
||||
fpath := '/tmp/permtest'
|
||||
os.create(fpath) or { panic("Couldn't create file") }
|
||||
os.chmod(fpath, 0o0777)
|
||||
os.chmod(fpath, 0o0777) or { panic(err) }
|
||||
c_fpath := &char(fpath.str)
|
||||
mut s := C.stat{}
|
||||
unsafe {
|
||||
|
Reference in New Issue
Block a user