1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

autofree: tmp arg var frees fixes

This commit is contained in:
Alexander Medvednikov
2020-08-27 11:30:28 +02:00
parent 3b03edd7cb
commit 15bdb8f7cd
6 changed files with 41 additions and 16 deletions

View File

@@ -128,7 +128,8 @@ pub fn cp_all(osource_path, odest_path string, overwrite bool) ? {
}
// single file copy
if !os.is_dir(source_path) {
adjusted_path := if os.is_dir(dest_path) {os.join_path(dest_path,os.file_name(source_path)) } else { dest_path }
adjusted_path := if os.is_dir(dest_path) {
os.join_path(dest_path,os.file_name(source_path)) } else { dest_path }
if os.exists(adjusted_path) {
if overwrite {
os.rm(adjusted_path)