diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:11:33 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:11:33 +0200 |
commit | 6fcfe73ca751f068978ce201094b17cf2dfe4d20 (patch) | |
tree | e7d85e8f9057430b480cd0e2f5ccb43c9d2ef8f8 /shared/recycler.cpp | |
parent | 3.15 (diff) | |
download | FreeFileSync-6fcfe73ca751f068978ce201094b17cf2dfe4d20.tar.gz FreeFileSync-6fcfe73ca751f068978ce201094b17cf2dfe4d20.tar.bz2 FreeFileSync-6fcfe73ca751f068978ce201094b17cf2dfe4d20.zip |
3.16
Diffstat (limited to 'shared/recycler.cpp')
-rw-r--r-- | shared/recycler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shared/recycler.cpp b/shared/recycler.cpp index a2b080c9..4fedf01f 100644 --- a/shared/recycler.cpp +++ b/shared/recycler.cpp @@ -146,12 +146,12 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw ( } -void ffs3::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileError) +bool ffs3::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileError) { #ifdef FFS_WIN const Zstring filenameFmt = applyLongPathPrefix(fileToDelete); if (::GetFileAttributes(filenameFmt.c_str()) == INVALID_FILE_ATTRIBUTES) - return; //neither file nor any other object with that name existing: no error situation, manual deletion relies on it! + return false; //neither file nor any other object with that name existing: no error situation, manual deletion relies on it! std::vector<Zstring> fileNames; fileNames.push_back(fileToDelete); @@ -160,7 +160,7 @@ void ffs3::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileError) #elif defined FFS_LINUX struct stat fileInfo; if (::lstat(fileToDelete.c_str(), &fileInfo) != 0) - return; //neither file nor any other object with that name existing: no error situation, manual deletion relies on it! + return false; //neither file nor any other object with that name existing: no error situation, manual deletion relies on it! Glib::RefPtr<Gio::File> fileObj = Gio::File::create_for_path(fileToDelete.c_str()); //never fails @@ -181,6 +181,7 @@ void ffs3::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileError) wxT("(") + errorMessage + wxT(")")); } #endif +return true; } |