mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
refactor: add pathbuf and std::string-friendly helpers to tr_sys file and path funcs (#3118)
* refactor: add sv-friendly tr_sys_dir_create() variant * refactor: add sv-friendly tr_sys_path_get_info() variant * refactor: add sv-friendly tr_sys_path_exists() variant * refactor: add sv-friendly tr_sys_path_remove() variant * refactor: add sv-friendly tr_sys_path_rename() variant * fixup! refactor: add sv-friendly tr_sys_path_rename() variant
This commit is contained in:
@@ -293,7 +293,7 @@ static auto onFileAdded(tr_watchdir_t dir, char const* name, void* vsession)
|
||||
|
||||
tr_logAddInfo(fmt::format(_("Removing torrent file '{path}'"), fmt::arg("path", name)));
|
||||
|
||||
if (!tr_sys_path_remove(filename.c_str(), &error))
|
||||
if (!tr_sys_path_remove(filename, &error))
|
||||
{
|
||||
tr_logAddError(fmt::format(
|
||||
_("Couldn't remove '{path}': {error} ({error_code})"),
|
||||
@@ -906,7 +906,7 @@ CLEANUP:
|
||||
/* cleanup */
|
||||
if (pidfile_created)
|
||||
{
|
||||
tr_sys_path_remove(sz_pid_filename.c_str());
|
||||
tr_sys_path_remove(sz_pid_filename);
|
||||
}
|
||||
|
||||
sd_notify(0, "STATUS=\n");
|
||||
|
||||
Reference in New Issue
Block a user