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

more vfmt fixes

This commit is contained in:
Alexander Medvednikov
2019-11-09 22:05:44 +03:00
parent 30481a36dc
commit 3d4f85069f
11 changed files with 91 additions and 50 deletions

View File

@@ -157,7 +157,7 @@ pub fn cp_r(source_path, dest_path string, overwrite bool) ?bool{
}
//single file copy
if !os.is_dir(source_path) {
adjasted_path := if os.is_dir(dest_path) {
adjasted_path := if os.is_dir(dest_path) {
filepath.join(dest_path, os.basedir(source_path)) } else { dest_path }
if os.file_exists(adjasted_path) {
if overwrite { os.rm(adjasted_path) }
@@ -178,7 +178,7 @@ pub fn cp_r(source_path, dest_path string, overwrite bool) ?bool{
}
cp_r(sp, dp, overwrite) or {
os.rmdir(dp)
panic(err)
panic(err)
}
}
return true