Skip to content

Commit

Permalink
improve usability
Browse files Browse the repository at this point in the history
  • Loading branch information
XUranus committed Nov 9, 2023
1 parent 03a5e2e commit 12ef292
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/VolumeCopyMountProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef VOLUMEBACKUP_VOLUME_COPY_MOUNT_PROVIDER_HEADER
#define VOLUMEBACKUP_VOLUME_COPY_MOUNT_PROVIDER_HEADER

#include "VolumeProtectMacros.h"
#include "common/VolumeProtectMacros.h"

#ifdef _MSC_VER

Expand Down
2 changes: 1 addition & 1 deletion include/VolumeProtector.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef VOLUMEBACKUP_PROTECT_FACADE_HEADER
#define VOLUMEBACKUP_PROTECT_FACADE_HEADER

#include "VolumeProtectMacros.h"
#include "common/VolumeProtectMacros.h"
#include <string>

/**
Expand Down
2 changes: 1 addition & 1 deletion src/native/FileSystemAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ bool fsapi::RemoveFile(const std::string& dirPath, const std::string& filename)

uint32_t fsapi::ProcessorsNum()
{
#ifdef __linux
#ifdef __linux__
auto processorCount = sysconf(_SC_NPROCESSORS_ONLN);
return processorCount <= 0 ? DEFAULT_PROCESSORS_NUM : processorCount;
#endif
Expand Down
7 changes: 6 additions & 1 deletion src/native/TaskResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ using namespace volumeprotect::common;

namespace {
constexpr auto DUMMY_SESSION_INDEX = 0;
#ifdef _WIN32
const std::string SEPARTOR = "\\";
#else
const std::string SEPARTOR = "/";
#endif
}

// implement static util functions...
Expand Down Expand Up @@ -373,7 +378,7 @@ bool RestoreTaskResourceManager::PrepareCopyResource()
bool RestoreTaskResourceManager::ResourceExists()
{
for (const std::string& copyDataFile : m_copyDataFiles) {
if (!fsapi::IsFileExists(copyDataFile)) {
if (!fsapi::IsFileExists(m_copyDataDirPath + SEPARTOR + copyDataFile)) {
ERRLOG("restore copy %s, copy data file %s not exists", m_copyName.c_str(), copyDataFile.c_str());
return false;
}
Expand Down

0 comments on commit 12ef292

Please sign in to comment.