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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user