mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: fix os.cp_all, by making the dst folder, if it does not exist already
This commit is contained in:
@ -48,6 +48,9 @@ pub fn cp_all(src string, dst string, overwrite bool) ? {
|
||||
cp(source_path, adjusted_path) ?
|
||||
return
|
||||
}
|
||||
if !exists(dest_path) {
|
||||
mkdir(dest_path) ?
|
||||
}
|
||||
if !is_dir(dest_path) {
|
||||
return error('Destination path is not a valid directory')
|
||||
}
|
||||
|
Reference in New Issue
Block a user