1
0
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:
yuyi
2020-02-18 03:31:23 +08:00
committed by GitHub
parent 6079025985
commit 6849a4e770
26 changed files with 105 additions and 99 deletions

View File

@ -177,7 +177,7 @@ fn vpm_install(module_names []string) {
println('Skipping module "$name", since it uses an unsupported VCS {$vcs} .')
continue
}
final_module_path := os.realpath(filepath.join(settings.vmodules_path,mod.name.replace('.', os.path_separator)))
final_module_path := os.realpath(filepath.join(settings.vmodules_path,mod.name.replace('.', filepath.separator)))
if os.exists(final_module_path) {
vpm_update([name])
continue
@ -287,7 +287,7 @@ fn vpm_remove(module_names []string) {
}
fn valid_final_path_of_existing_module(name string) ?string {
name_of_vmodules_folder := filepath.join(settings.vmodules_path,name.replace('.', os.path_separator))
name_of_vmodules_folder := filepath.join(settings.vmodules_path,name.replace('.', filepath.separator))
final_module_path := os.realpath(name_of_vmodules_folder)
if !os.exists(final_module_path) {
println('No module with name "$name" exists at $name_of_vmodules_folder')