Skip to content

Commit

Permalink
Usunięcie zbędnych komunikatów z DoBackup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Barc committed Feb 3, 2021
1 parent e4c1d79 commit e1081bc
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions AutoBackup/TaskExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@ void TaskExecutor::DoBackup(string source, string destination, bool compress)
source.pop_back();
WIN32_FIND_DATAA findFileData;
HANDLE findHandle = FindFirstFile(source.c_str(), &findFileData);
cout << "Source: " << source << endl;
cout << "Error: " << GetLastError() << endl;
if (findHandle != INVALID_HANDLE_VALUE)
{
cout << "Attr: " << findFileData.dwFileAttributes << endl;
bool success = false;

if (findFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
Expand All @@ -153,11 +150,9 @@ void TaskExecutor::DoBackup(string source, string destination, bool compress)
source += "\\";
source += "*.*";
source.append(1, '\0');
cout << "Source append: " << source << endl;
if (destination.back() != '\\')
destination += "\\";
destination.append(1, '\0');
//std::cout << source << " " << destination << endl;
SHFILEOPSTRUCT shFileOperationStructure = { 0 };
shFileOperationStructure.wFunc = FO_COPY;
shFileOperationStructure.fFlags = FOF_SILENT;
Expand Down

0 comments on commit e1081bc

Please sign in to comment.