mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +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:
@@ -186,7 +186,7 @@ void OptionsDialog::Impl::sourceChanged(Gtk::FileChooserButton* b)
|
||||
{
|
||||
bool new_file = false;
|
||||
|
||||
if (!filename.empty() && (filename_.empty() || !tr_sys_path_is_same(filename.c_str(), filename_.c_str())))
|
||||
if (!filename.empty() && (filename_.empty() || !tr_sys_path_is_same(filename, filename_)))
|
||||
{
|
||||
filename_ = filename;
|
||||
tr_ctorSetMetainfoFromFile(ctor_.get(), filename_.c_str(), nullptr);
|
||||
@@ -216,7 +216,7 @@ void OptionsDialog::Impl::downloadDirChanged(Gtk::FileChooserButton* b)
|
||||
{
|
||||
auto const fname = b->get_filename();
|
||||
|
||||
if (!fname.empty() && (downloadDir_.empty() || !tr_sys_path_is_same(fname.c_str(), downloadDir_.c_str())))
|
||||
if (!fname.empty() && (downloadDir_.empty() || !tr_sys_path_is_same(fname, downloadDir_)))
|
||||
{
|
||||
downloadDir_ = fname;
|
||||
updateTorrent();
|
||||
|
||||
Reference in New Issue
Block a user