fx.io: expand path joining functionality to non-path strings
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user