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

v.util,tools: use os.join_path_single

This commit is contained in:
Delyan Angelov
2021-11-22 21:42:43 +02:00
parent bd9564e38b
commit d431145a39
9 changed files with 24 additions and 24 deletions

View File

@@ -72,11 +72,11 @@ pub fn color_compare_files(diff_cmd string, file1 string, file2 string) string {
}
pub fn color_compare_strings(diff_cmd string, unique_prefix string, expected string, found string) string {
cdir := os.join_path(os.cache_dir(), unique_prefix)
cdir := os.join_path_single(os.cache_dir(), unique_prefix)
os.mkdir(cdir) or {}
ctime := time.sys_mono_now()
e_file := os.join_path(cdir, '${ctime}.expected.txt')
f_file := os.join_path(cdir, '${ctime}.found.txt')
e_file := os.join_path_single(cdir, '${ctime}.expected.txt')
f_file := os.join_path_single(cdir, '${ctime}.found.txt')
os.write_file(e_file, expected) or { panic(err) }
os.write_file(f_file, found) or { panic(err) }
res := color_compare_files(diff_cmd, e_file, f_file)