diff --git a/lib/xy.c b/lib/xy.c index 1aac210..3f68b9a 100644 --- a/lib/xy.c +++ b/lib/xy.c @@ -695,7 +695,7 @@ xy_normalize_path (const char *path) if (xy_str_start_with (new, "~/")) { // 或 %USERPROFILE% - new = xy_strjoin (3, xy_os_home, "\\", + new = xy_strjoin (3, xy_os_home(), "\\", xy_str_delete_prefix (new, "~/")); } new = xy_str_gsub (new, "/", "\\"); @@ -704,7 +704,7 @@ xy_normalize_path (const char *path) { if (xy_str_start_with (new, "~/")) { - new = xy_strjoin (3, xy_os_home, "/", + new = xy_strjoin (3, xy_os_home(), "/", xy_str_delete_prefix (new, "~/")); } } diff --git a/src/recipe/lang/Dart/Flutter.c b/src/recipe/lang/Dart/Flutter.c index 84c34b3..244d37a 100644 --- a/src/recipe/lang/Dart/Flutter.c +++ b/src/recipe/lang/Dart/Flutter.c @@ -62,11 +62,11 @@ pl_dart_flutter_setsrc (char *option) { w = xy_strjoin (3, "$env:FLUTTER_STORAGE_BASE_URL = \"", source.url, "\"\n"); - if (xy_file_exist (xy_win_powershell_profile)) - chsrc_append_to_file (w, xy_win_powershell_profile); + if (xy_file_exist (xy_win_powershell_profile())) + chsrc_append_to_file (w, xy_win_powershell_profile()); - if (xy_file_exist (xy_win_powershellv5_profile)) - chsrc_append_to_file (w, xy_win_powershellv5_profile); + if (xy_file_exist (xy_win_powershellv5_profile())) + chsrc_append_to_file (w, xy_win_powershellv5_profile()); } else { diff --git a/src/recipe/lang/Dart/Pub.c b/src/recipe/lang/Dart/Pub.c index f12f708..0422324 100644 --- a/src/recipe/lang/Dart/Pub.c +++ b/src/recipe/lang/Dart/Pub.c @@ -57,11 +57,11 @@ pl_dart_setsrc (char *option) { w = xy_strjoin (3, "$env:PUB_HOSTED_URL = \"", source.url, "\"\n"); - if (xy_file_exist (xy_win_powershell_profile)) - chsrc_append_to_file (w, xy_win_powershell_profile); + if (xy_file_exist (xy_win_powershell_profile())) + chsrc_append_to_file (w, xy_win_powershell_profile()); - if (xy_file_exist (xy_win_powershellv5_profile)) - chsrc_append_to_file (w, xy_win_powershellv5_profile); + if (xy_file_exist (xy_win_powershellv5_profile())) + chsrc_append_to_file (w, xy_win_powershellv5_profile()); } else { diff --git a/src/recipe/ware/Anaconda.c b/src/recipe/ware/Anaconda.c index 6eeb43a..55128c0 100644 --- a/src/recipe/ware/Anaconda.c +++ b/src/recipe/ware/Anaconda.c @@ -56,7 +56,7 @@ wr_anaconda_setsrc (char *option) // TODO: 待确认 windows 上也是这里吗? - char *config = xy_2strjoin (xy_os_home, "/.condarc"); + char *config = xy_2strjoin (xy_os_home(), "/.condarc"); if (xy_on_windows) {