Windows: port dir size computation
This commit is contained in:
parent
d2c87318cb
commit
8368995f22
@ -401,7 +401,7 @@ void RclMain::showActiveTypes()
|
|||||||
dialog.setWindowTitle(tr("Indexed MIME Types"));
|
dialog.setWindowTitle(tr("Indexed MIME Types"));
|
||||||
|
|
||||||
// Turn the result into a string and display
|
// Turn the result into a string and display
|
||||||
dialog.groupBox->setTitle(tr("Content has been indexed for these mime types:"));
|
dialog.groupBox->setTitle(tr("Content has been indexed for these MIME types:"));
|
||||||
|
|
||||||
// We replace the list with an editor so that the user can copy/paste
|
// We replace the list with an editor so that the user can copy/paste
|
||||||
delete dialog.listWidget;
|
delete dialog.listWidget;
|
||||||
|
|||||||
@ -487,7 +487,11 @@ int64_t fsTreeBytes(const string& topdir)
|
|||||||
FsTreeWalker::CbFlag flg) {
|
FsTreeWalker::CbFlag flg) {
|
||||||
if (flg == FsTreeWalker::FtwDirEnter ||
|
if (flg == FsTreeWalker::FtwDirEnter ||
|
||||||
flg == FsTreeWalker::FtwRegular) {
|
flg == FsTreeWalker::FtwRegular) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
totalbytes += st->st_size;
|
||||||
|
#else
|
||||||
totalbytes += st->st_blocks * 512;
|
totalbytes += st->st_blocks * 512;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return FsTreeWalker::FtwOk;
|
return FsTreeWalker::FtwOk;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -557,9 +557,9 @@ int path_fileprops(const std::string path, struct stat *stp, bool follow)
|
|||||||
stp->st_ino = mst.st_ino;
|
stp->st_ino = mst.st_ino;
|
||||||
stp->st_dev = mst.st_dev;
|
stp->st_dev = mst.st_dev;
|
||||||
stp->st_ctime = mst.st_ctime;
|
stp->st_ctime = mst.st_ctime;
|
||||||
#endif
|
|
||||||
stp->st_blocks = mst.st_blocks;
|
stp->st_blocks = mst.st_blocks;
|
||||||
stp->st_blksize = mst.st_blksize;
|
stp->st_blksize = mst.st_blksize;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user