This commit is contained in:
@@ -72,10 +72,6 @@ encrypt_provider::encrypt_provider(app_config &config) : config_(config) {}
|
|||||||
auto encrypt_provider::create_api_file(
|
auto encrypt_provider::create_api_file(
|
||||||
const std::string &api_path, bool directory,
|
const std::string &api_path, bool directory,
|
||||||
const std::string &source_path) -> api_file {
|
const std::string &source_path) -> api_file {
|
||||||
static constexpr const std::string_view function_name{
|
|
||||||
static_cast<const char *>(__FUNCTION__),
|
|
||||||
};
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
struct _stat64 buf {};
|
struct _stat64 buf {};
|
||||||
_stat64(source_path.c_str(), &buf);
|
_stat64(source_path.c_str(), &buf);
|
||||||
@@ -114,7 +110,7 @@ auto encrypt_provider::create_api_file(
|
|||||||
static_cast<std::uint64_t>(buf.st_ctime));
|
static_cast<std::uint64_t>(buf.st_ctime));
|
||||||
file.modified_date = utils::time::windows_time_to_unix_time(
|
file.modified_date = utils::time::windows_time_to_unix_time(
|
||||||
static_cast<std::uint64_t>(buf.st_mtime));
|
static_cast<std::uint64_t>(buf.st_mtime));
|
||||||
#else // !defined(_WIN32)
|
#else // !defined(_WIN32) && !defined(__APPLE__)
|
||||||
file.changed_date = static_cast<std::uint64_t>(
|
file.changed_date = static_cast<std::uint64_t>(
|
||||||
buf.st_mtim.tv_nsec +
|
buf.st_mtim.tv_nsec +
|
||||||
(buf.st_mtim.tv_sec * utils::time::NANOS_PER_SECOND));
|
(buf.st_mtim.tv_sec * utils::time::NANOS_PER_SECOND));
|
||||||
|
Reference in New Issue
Block a user