mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
filepath: path separator (#3756)
This commit is contained in:
@ -30,9 +30,9 @@ fn generate_vh(mod string) {
|
||||
println('\n\n\n\nGenerating a V header file for module `$mod`')
|
||||
vexe := vexe_path()
|
||||
full_mod_path := filepath.join(filepath.dir(vexe),mod)
|
||||
dir := if mod.starts_with('vlib') { '$compiler.v_modules_path${os.path_separator}$mod' } else { mod }
|
||||
dir := if mod.starts_with('vlib') { '$compiler.v_modules_path${filepath.separator}$mod' } else { mod }
|
||||
path := dir + '.vh'
|
||||
pdir := dir.all_before_last(os.path_separator)
|
||||
pdir := dir.all_before_last(filepath.separator)
|
||||
if !os.is_dir(pdir) {
|
||||
os.mkdir_all(pdir)
|
||||
// os.mkdir(os.realpath(dir)) or { panic(err) }
|
||||
@ -50,7 +50,7 @@ fn generate_vh(mod string) {
|
||||
// mut vfiles := os.ls(full_mod_path) or {
|
||||
// exit(1)
|
||||
// }
|
||||
filtered := vfiles.filter(it.ends_with('.v') && !it.ends_with('test.v') && !it.ends_with('_windows.v') && !it.ends_with('_win.v') && !it.ends_with('_lin.v') && !it.contains('${os.path_separator}examples') && !it.contains('_js.v') && !it.contains('_bare.v') && !it.contains('${os.path_separator}js')) // TODO merge once filter allows it
|
||||
filtered := vfiles.filter(it.ends_with('.v') && !it.ends_with('test.v') && !it.ends_with('_windows.v') && !it.ends_with('_win.v') && !it.ends_with('_lin.v') && !it.contains('${filepath.separator}examples') && !it.contains('_js.v') && !it.contains('_bare.v') && !it.contains('${filepath.separator}js')) // TODO merge once filter allows it
|
||||
// println('f:')
|
||||
// println(filtered)
|
||||
mut pref := &pref.Preferences {
|
||||
|
Reference in New Issue
Block a user