diff --git a/src/utils/fstreewalk.cpp b/src/utils/fstreewalk.cpp index 29d0356d..ab41dd76 100644 --- a/src/utils/fstreewalk.cpp +++ b/src/utils/fstreewalk.cpp @@ -487,7 +487,11 @@ int64_t fsTreeBytes(const string& topdir) FsTreeWalker::CbFlag flg) { if (flg == FsTreeWalker::FtwDirEnter || flg == FsTreeWalker::FtwRegular) { +#ifdef _WIN32 + totalbytes += st->st_size; +#else totalbytes += st->st_blocks * 512; +#endif } return FsTreeWalker::FtwOk; } diff --git a/src/utils/pathut.cpp b/src/utils/pathut.cpp index 53d24228..f6a4350d 100644 --- a/src/utils/pathut.cpp +++ b/src/utils/pathut.cpp @@ -557,9 +557,9 @@ int path_fileprops(const std::string path, struct stat *stp, bool follow) stp->st_ino = mst.st_ino; stp->st_dev = mst.st_dev; stp->st_ctime = mst.st_ctime; -#endif stp->st_blocks = mst.st_blocks; stp->st_blksize = mst.st_blksize; +#endif return 0; }