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

os: replace dir_exists with is_dir; file_exists() => exists()

This commit is contained in:
Alexander Medvednikov
2019-12-04 23:03:12 +03:00
parent fb237b9e53
commit a57e29dfc5
28 changed files with 116 additions and 98 deletions

View File

@@ -173,12 +173,12 @@ pub fn new_context(cfg gg.Cfg) &FreeType {
if font_path == '' {
font_path = 'RobotoMono-Regular.ttf'
}
if !os.file_exists(font_path) {
if !os.exists(font_path) {
exe_path := os.executable()
exe_dir := os.basedir(exe_path)
font_path = '$exe_dir/$font_path'
}
if !os.file_exists(font_path) {
if !os.exists(font_path) {
println('failed to load $font_path')
return 0
}