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

compiler: support VTMP; tests: delete .tmp.c files on successfull tests

This commit is contained in:
Delyan Angelov
2020-07-06 15:08:38 +03:00
parent d82e6c9cd9
commit 6b2777e681
3 changed files with 27 additions and 10 deletions

View File

@@ -1225,12 +1225,14 @@ pub fn flush() {
pub fn mkdir_all(path string) {
mut p := if path.starts_with(os.path_separator) { os.path_separator } else { '' }
for subdir in path.split(os.path_separator) {
path_parts := path.trim_left(os.path_separator).split(os.path_separator)
for subdir in path_parts {
p += subdir + os.path_separator
if !os.is_dir(p) {
os.mkdir(p) or {
panic(err)
}
if os.exists(p) && os.is_dir(p) {
continue
}
os.mkdir(p) or {
panic('folder: $p, error: $err')
}
}
}