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

modules: create the modules directory if it's missing, use cache/

This commit is contained in:
Alexander Medvednikov
2019-10-12 05:04:56 +03:00
parent acbca7584b
commit b107b4f1e5
4 changed files with 19 additions and 5 deletions

View File

@ -858,3 +858,13 @@ pub fn print_backtrace() {
*/
}
pub fn mkdir_all(path string) {
mut p := ''
for subdir in path.split(os.PathSeparator) {
p += os.PathSeparator + subdir
if !os.dir_exists(p) {
os.mkdir(p)
}
}
}