add enabling and disabling setdate
This commit is contained in:
@ -371,6 +371,7 @@ namespace Tesses::Framework::Crypto
|
||||
}
|
||||
bool RandomBytes(std::vector<uint8_t>& output, std::string personal_str)
|
||||
{
|
||||
#if defined(TESSESFRAMEWORK_ENABLE_MBED)
|
||||
mbedtls_entropy_context entropy;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
|
||||
@ -394,5 +395,7 @@ namespace Tesses::Framework::Crypto
|
||||
mbedtls_ctr_drbg_free(&ctr_drbg);
|
||||
mbedtls_entropy_free(&entropy);
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,8 @@ namespace Tesses::Framework::Filesystem
|
||||
void LocalFilesystem::SetDate(VFSPath path, time_t lastWrite, time_t lastAccess)
|
||||
{
|
||||
std::string s = VFSPathToSystem(path);
|
||||
#if defined(_WIN32)
|
||||
#if defined(TESSESFRAMEWORK_ENABLE_SETDATE)
|
||||
#if defined(_WIN32)
|
||||
FILETIME lastWriteF;
|
||||
FILETIME lastAccessF;
|
||||
TimetToFileTime(lastWrite,&lastWriteF);
|
||||
@ -62,6 +63,7 @@ namespace Tesses::Framework::Filesystem
|
||||
utim.modtime = lastWrite;
|
||||
utime(s.c_str(),&utim);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
VFSPath LocalFilesystem::ReadLink(VFSPath path)
|
||||
{
|
||||
@ -191,4 +193,4 @@ namespace Tesses::Framework::Filesystem
|
||||
LocalFilesystem LocalFS;
|
||||
}
|
||||
|
||||
// C:/Users/Jim/Joel
|
||||
// C:/Users/Jim/Joel
|
||||
|
||||
Reference in New Issue
Block a user