From 7caf4090b1429da068817892f573d4611f251a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Fri, 18 Feb 2022 22:05:44 +0100 Subject: [PATCH] Use fs::file_size instead of stat --- app/actions.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/actions.cpp b/app/actions.cpp index f26f6916..09d7dca9 100644 --- a/app/actions.cpp +++ b/app/actions.cpp @@ -278,11 +278,8 @@ namespace Action { std::cout << path_ << std::endl; // Filesize - struct stat buf; - if (0 == stat(path_.c_str(), &buf)) { - printLabel(_("File size")); - std::cout << buf.st_size << " " << _("Bytes") << std::endl; - } + printLabel(_("File size")); + std::cout << fs::file_size(path_) << " " << _("Bytes") << std::endl; // MIME type printLabel(_("MIME type"));