fx.io: expand path joining functionality to non-path strings

This commit is contained in:
2026-06-20 15:25:16 +01:00
parent 32d4d0abf2
commit ee11ff240f
10 changed files with 239 additions and 151 deletions
+5 -5
View File
@@ -248,11 +248,11 @@ static enum fx_status file_swap_shadow(
int err;
err = rename(fx_path_ptr(main_file->path), fx_path_ptr(tmp_path));
err = rename(fx_path_get_cstr(main_file->path), fx_path_get_cstr(tmp_path));
err = rename(
fx_path_ptr(shadow_file->path),
fx_path_ptr(main_file->path));
err = rename(fx_path_ptr(tmp_path), fx_path_ptr(shadow_file->path));
fx_path_get_cstr(shadow_file->path),
fx_path_get_cstr(main_file->path));
err = rename(fx_path_get_cstr(tmp_path), fx_path_get_cstr(shadow_file->path));
fx_path_unref(tmp_path);
@@ -441,7 +441,7 @@ fx_result fx_file_open(
return FX_RESULT_ERR(NO_MEMORY);
}
int fd = open(fx_path_ptr(abs_path), flags, 0644);
int fd = open(fx_path_get_cstr(abs_path), flags, 0644);
if (fd == -1) {
fx_path_unref(abs_path);
return FX_RESULT_STATUS(