1
0

Fix move file

This commit is contained in:
Scott E. Graves
2017-04-06 13:06:44 -05:00
parent 8834eb76d2
commit dd4b93693b
4 changed files with 56 additions and 40 deletions

View File

@@ -177,12 +177,13 @@ public:
void Refresh(const CSiaCurl& siaCurl, CSiaDriveConfig* siaDriveConfig);
public:
CSiaError<_SiaApiErrorCode> FileExists(const SString& siaPath, bool& exists) const;
CSiaError<_SiaApiErrorCode> DownloadFile(const SString& siaPath, const SString& location) const;
CSiaError<_SiaApiErrorCode> GetFileTree(std::shared_ptr<_CSiaFileTree>& siaFileTree) const;
CSiaError<_SiaApiErrorCode> FileExists(const SString& siaPath, bool& exists) const;
_SiaRenterAllowance GetAllowance() const;
CSiaError<_SiaApiErrorCode> SetAllowance(const _SiaRenterAllowance& renterAllowance);
CSiaError<_SiaApiErrorCode> GetFileTree(std::shared_ptr<_CSiaFileTree>& siaFileTree) const;
CSiaError<_SiaApiErrorCode> RefreshFileTree( );
CSiaError<_SiaApiErrorCode> RenameFile(const SString& siaPath, const SString& newSiaPath);
CSiaError<_SiaApiErrorCode> SetAllowance(const _SiaRenterAllowance& renterAllowance);
};
class SIADRIVE_EXPORTABLE _CSiaConsensus :

View File

@@ -685,10 +685,11 @@ class SIADRIVE_DOKAN_EXPORTABLE DokanMoveFileW :
public CEvent
{
public:
DokanMoveFileW(const SString& srcPath, const SString& destPath) :
DokanMoveFileW(const SString& srcPath, const SString& destPath, const NTSTATUS& result) :
CEvent(EventLevel::Debug),
_srcPath(srcPath),
_destPath(destPath)
_destPath(destPath),
_result(result)
{
}
@@ -700,16 +701,19 @@ public:
private:
const SString _srcPath;
const SString _destPath;
const NTSTATUS _result;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanMoveFileW(_srcPath, _destPath));
return std::shared_ptr<CEvent>(new DokanMoveFileW(_srcPath, _destPath, _result));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanMoveFileW|SRC|" + _srcPath + "|DEST|" + _destPath;
return L"DokanMoveFileW|SRC|" + _srcPath +
"|DEST|" + _destPath +
"|RES|" + SString::FromUInt64(_result);
}
};
NS_END(3)