mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-21 15:11:12 +00:00
Fix copy_directory_all
This commit is contained in:
@@ -208,7 +208,7 @@ read_directory_iterator :: proc(it: ^Read_Directory_Iterator) -> (fi: File_Info,
|
||||
}
|
||||
|
||||
// Recursively copies a directory to `dst` from `src`
|
||||
copy_directory_all :: proc(dst, src: string, dst_perm := 0o755) -> Error {
|
||||
copy_directory_all :: proc(dst, src: string, dst_perm := Permissions_Default) -> Error {
|
||||
when #defined(_copy_directory_all_native) {
|
||||
return _copy_directory_all_native(dst, src, dst_perm)
|
||||
} else {
|
||||
@@ -217,7 +217,7 @@ copy_directory_all :: proc(dst, src: string, dst_perm := 0o755) -> Error {
|
||||
}
|
||||
|
||||
@(private)
|
||||
_copy_directory_all :: proc(dst, src: string, dst_perm := 0o755) -> Error {
|
||||
_copy_directory_all :: proc(dst, src: string, dst_perm := Permissions_Default) -> Error {
|
||||
err := make_directory(dst, dst_perm)
|
||||
if err != nil && err != .Exist {
|
||||
return err
|
||||
|
||||
@@ -58,7 +58,7 @@ make_directory_temp :: proc(dir, pattern: string, allocator: runtime.Allocator)
|
||||
attempts := 0
|
||||
for {
|
||||
name := concatenate_strings_from_buffer(name_buf[:], prefix, random_string(rand_buf[:]), suffix)
|
||||
err = make_directory(name, 0o700)
|
||||
err = make_directory(name)
|
||||
if err == nil {
|
||||
return clone_string(name, allocator)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user