diff options
author | B Stack <bgstack15@gmail.com> | 2020-07-22 11:37:03 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-07-22 11:37:03 -0400 |
commit | c95b3937fef3e2c63768f1b3b1dc2c898f23d91d (patch) | |
tree | 10260e25ae905564f7978b83fc4e316670f987c6 /zen/recycler.cpp | |
parent | Merge branch '10.25' into 'master' (diff) | |
download | FreeFileSync-c95b3937fef3e2c63768f1b3b1dc2c898f23d91d.tar.gz FreeFileSync-c95b3937fef3e2c63768f1b3b1dc2c898f23d91d.tar.bz2 FreeFileSync-c95b3937fef3e2c63768f1b3b1dc2c898f23d91d.zip |
add upstream 11.0
Diffstat (limited to 'zen/recycler.cpp')
-rw-r--r-- | zen/recycler.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/zen/recycler.cpp b/zen/recycler.cpp index 28b2d6c1..9c463546 100644 --- a/zen/recycler.cpp +++ b/zen/recycler.cpp @@ -23,7 +23,7 @@ bool zen::recycleOrDeleteIfExists(const Zstring& itemPath) //throw FileError ZEN_ON_SCOPE_EXIT(g_object_unref(file);) GError* error = nullptr; - ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error);); + ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error)); if (!::g_file_trash(file, nullptr, &error)) { @@ -52,10 +52,9 @@ bool zen::recycleOrDeleteIfExists(const Zstring& itemPath) //throw FileError } -/* -We really need access to a similar function to check whether a directory supports trashing and emit a warning if it does not! +/* We really need access to a similar function to check whether a directory supports trashing and emit a warning if it does not! -The following function looks perfect, alas it is restricted to local files and to the implementation of GIO only: + The following function looks perfect, alas it is restricted to local files and to the implementation of GIO only: gboolean _g_local_file_has_trash_dir(const char* dirpath, dev_t dir_dev); See: http://www.netmite.com/android/mydroid/2.0/external/bluetooth/glib/gio/glocalfileinfo.h @@ -67,5 +66,4 @@ The following function looks perfect, alas it is restricted to local files and t writable && parent_info->has_trash_dir); => We're NOT interested in whether the specified folder can be trashed, but whether it supports thrashing its child elements! (Only support, not actual write access!) - This renders G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH useless for this purpose. -*/ + This renders G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH useless for this purpose. */ |