summaryrefslogtreecommitdiff
path: root/shared/recycler.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:05:53 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:05:53 +0200
commit618dfb51d93898632830f1b87443d3f748780871 (patch)
treebac520a2e261154f8d35b0cb8aa345f5ab373811 /shared/recycler.cpp
parent3.4 (diff)
downloadFreeFileSync-618dfb51d93898632830f1b87443d3f748780871.tar.gz
FreeFileSync-618dfb51d93898632830f1b87443d3f748780871.tar.bz2
FreeFileSync-618dfb51d93898632830f1b87443d3f748780871.zip
3.5
Diffstat (limited to 'shared/recycler.cpp')
-rw-r--r--shared/recycler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/recycler.cpp b/shared/recycler.cpp
index 4b5a4639..438db680 100644
--- a/shared/recycler.cpp
+++ b/shared/recycler.cpp
@@ -123,6 +123,7 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw (
{
//#warning moving long file paths to recycler does not work! clarify!
//filenameDoubleNull += removeLongPathPrefix(*i); //::SHFileOperation() can't handle \\?\-prefix!
+ //You should use fully-qualified path names with this function. Using it with relative path names is not thread safe.
filenameDoubleNull += *i; //::SHFileOperation() can't handle \\?\-prefix!
filenameDoubleNull += DefaultChar(0);
}
@@ -164,7 +165,7 @@ void FreeFileSync::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileE
return; //neither file nor any other object with that name existing: no error situation, manual deletion relies on it!
#ifdef RECYCLER_GIO
- boost::shared_ptr<GFile> fileObj(g_file_new_for_path(fileToDelete.c_str()), &g_object_unref);
+ boost::shared_ptr<GFile> fileObj(g_file_new_for_path(fileToDelete.c_str()), &g_object_unref); //g_file_new_for_path never fails => g_object_unref can always be safely called
GError* error = NULL;
if (g_file_trash(fileObj.get(), NULL, &error) == FALSE)
{
@@ -199,8 +200,7 @@ bool FreeFileSync::recycleBinExists()
#elif defined RECYCLER_NONE
return false;
#else
-you have to choose a recycler!
+ you have to choose a recycler!
#endif
-
#endif
}
bgstack15