summaryrefslogtreecommitdiff
path: root/shared/recycler.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
commitc32707148292d104c66276b43796d6057c8c7a5d (patch)
treebb83513f4aff24153e21a4ec92e34e4c27651b1f /shared/recycler.cpp
parent3.9 (diff)
downloadFreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.gz
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.bz2
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.zip
3.10
Diffstat (limited to 'shared/recycler.cpp')
-rw-r--r--shared/recycler.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/shared/recycler.cpp b/shared/recycler.cpp
index 1a73e105..31257a65 100644
--- a/shared/recycler.cpp
+++ b/shared/recycler.cpp
@@ -82,17 +82,17 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw (
if (useIFileOperation) //new recycle bin usage: available since Vista
{
- std::vector<const wchar_t*> fileNames;
+ std::vector<const wchar_t*> fileNames;
std::transform(filesToDelete.begin(), filesToDelete.end(),
std::back_inserter(fileNames), std::mem_fun_ref(&Zstring::c_str));
- using namespace FileOp;
+ using namespace fileop;
static const MoveToRecycleBinFct moveToRecycler =
- util::loadDllFunction<MoveToRecycleBinFct>(getRecyclerDllName().c_str(), moveToRecycleBinFctName);
+ util::getDllFun<MoveToRecycleBinFct>(getRecyclerDllName().c_str(), moveToRecycleBinFctName);
static const GetLastErrorFct getLastError =
- util::loadDllFunction<GetLastErrorFct>(getRecyclerDllName().c_str(), getLastErrorFctName);
+ util::getDllFun<GetLastErrorFct>(getRecyclerDllName().c_str(), getLastErrorFctName);
if (moveToRecycler == NULL || getLastError == NULL)
throw FileError(wxString(_("Error moving to Recycle Bin:")) + wxT("\n\"") + fileNames[0] + wxT("\"\n\n") + //report first file only... better than nothing
@@ -103,11 +103,11 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw (
// std::transform(filesToDelete.begin(), filesToDelete.end(),
// std::back_inserter(temp), std::ptr_fun(ffs3::removeLongPathPrefix)); //::IFileOperation() can't handle \\?\-prefix!
- if (!(*moveToRecycler)(&fileNames[0], //array must not be empty
- fileNames.size()))
+ if (!moveToRecycler(&fileNames[0], //array must not be empty
+ fileNames.size()))
{
wchar_t errorMessage[2000];
- (*getLastError)(errorMessage, 2000);
+ getLastError(errorMessage, 2000);
throw FileError(wxString(_("Error moving to Recycle Bin:")) + wxT("\n\"") + fileNames[0] + wxT("\"\n\n") + //report first file only... better than nothing
wxT("(") + errorMessage + wxT(")"));
}
@@ -121,7 +121,7 @@ void moveToWindowsRecycler(const std::vector<Zstring>& filesToDelete) //throw (
//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);
+ filenameDoubleNull += Zchar(0);
}
SHFILEOPSTRUCT fileOp;
@@ -166,8 +166,8 @@ void ffs3::moveToRecycleBin(const Zstring& fileToDelete) //throw (FileError)
try
{
if (!fileObj->trash())
- throw FileError(wxString(_("Error moving to Recycle Bin:")) + wxT("\n\"") + zToWx(fileToDelete) + wxT("\"\n\n") +
- wxT("(") + wxT("unknown error") + wxT(")"));
+ throw FileError(wxString(_("Error moving to Recycle Bin:")) + wxT("\n\"") + zToWx(fileToDelete) + wxT("\"\n\n") +
+ wxT("(") + wxT("unknown error") + wxT(")"));
}
catch (const Glib::Error& errorObj)
{
bgstack15