summaryrefslogtreecommitdiff
path: root/src/journal.h
diff options
context:
space:
mode:
authorMaximilian Eschenbacher <maximilian@eschenbacher.email>2022-02-14 21:58:57 +0100
committerJohn Wiegley <johnw@newartisans.com>2022-02-22 12:56:46 -0800
commit36d7fe8f5f4b6658ce9565d316b136b7ebea0933 (patch)
tree9b96b3e9c4cc1d3a64019fd8eabf39ede2efc3e4 /src/journal.h
parent8e79216887cf3c342dfca1ffa52cf4e6389d6de4 (diff)
downloadfork-ledger-36d7fe8f5f4b6658ce9565d316b136b7ebea0933.tar.gz
fork-ledger-36d7fe8f5f4b6658ce9565d316b136b7ebea0933.tar.bz2
fork-ledger-36d7fe8f5f4b6658ce9565d316b136b7ebea0933.zip
fileinfo_t: remove size member
it is currently not required but set. Incidentally, calling file_size() on a bash pipe e.g. /proc/self/fd/11 fails with: Error: boost::filesystem::file_size: Operation not permitted: "/proc/self/fd/11" when executing ledger as ledger -f <(cat journal)
Diffstat (limited to 'src/journal.h')
-rw-r--r--src/journal.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/journal.h b/src/journal.h
index 1732f760..ac5fe45b 100644
--- a/src/journal.h
+++ b/src/journal.h
@@ -78,21 +78,19 @@ public:
struct fileinfo_t
{
optional<path> filename;
- boost::uintmax_t size;
datetime_t modtime;
bool from_stream;
- fileinfo_t() : size(0), from_stream(true) {
+ fileinfo_t() : from_stream(true) {
TRACE_CTOR(journal_t::fileinfo_t, "");
}
fileinfo_t(const path& _filename)
: filename(_filename), from_stream(false) {
- size = file_size(*filename);
modtime = posix_time::from_time_t(last_write_time(*filename));
TRACE_CTOR(journal_t::fileinfo_t, "const path&");
}
fileinfo_t(const fileinfo_t& info)
- : filename(info.filename), size(info.size),
+ : filename(info.filename),
modtime(info.modtime), from_stream(info.from_stream)
{
TRACE_CTOR(journal_t::fileinfo_t, "copy");