I am using ledger-cli (next branch) on Windows. I have ledger journals for
2 years, and one main journal (main.ldg) in
which I included the journals of those 2 years. I use relative paths in the
include statements, as shown below:
include 2014.ldg
include 2015.ldg
All 3 files are placed in D:\data\ledger\
However, ledger can't find the included files when I use main.ldg as the
input file. I ran a debug command and this is the result:
> ledger-debug.exe -f D:\data\ledger\main.ldg stats --debug textual.include
1ms [INFO] Ledger starting
4ms [INFO] Parsing file "D:/data\ledger\main.ldg"
10ms [DEBUG] include: 2014.ldg
12ms [DEBUG] received a relative path
15ms [DEBUG] parent file path: "D:/data\ledger\main.ldg"
20ms [DEBUG] normalized path: D:/2014.ldg
23ms [DEBUG] resolved path: D:/2014.ldg
While parsing file "D:/data\ledger\main.ldg", line 1:
Error: File to include was not found: "D:/2014.ldg"
36ms [DEBUG] include: 2015.ldg
39ms [DEBUG] received a relative path
42ms [DEBUG] parent file path: "D:/data\ledger\main.ldg"
46ms [DEBUG] normalized path: D:/2015.ldg
50ms [DEBUG] resolved path: D:/2015.ldg
While parsing file "D:/data\ledger\main.ldg", line 2:
Error: File to include was not found: "D:/2015.ldg"
62ms [INFO] Ledger ended
Ledger is able to find the files if I'm in that directory and if I don't
use the full path in the input file.
> cd D:\data\ledger
> ledger-debug.exe -f main.ldg stats --debug textual.include
1ms [INFO] Ledger starting
5ms [INFO] Parsing file "D:\data\ledger\main.ldg"
9ms [DEBUG] include: 2014.ldg
12ms [DEBUG] received a relative path
15ms [DEBUG] parent file path: "D:\data\ledger\main.ldg"
22ms [DEBUG] normalized path: D:\data\ledger\2014.ldg
30ms [DEBUG] resolved path: D:/data\ledger\2014.ldg
37ms [DEBUG] Including: "D:/data\ledger\2014.ldg"
44ms [DEBUG] Master account:
46ms [INFO] Parsing file "D:/data\ledger\2014.ldg"
64ms [DEBUG] include: 2015.ldg
67ms [DEBUG] received a relative path
69ms [DEBUG] parent file path: "D:\data\ledger\main.ldg"
74ms [DEBUG] normalized path: D:\data\ledger\2015.ldg
79ms [DEBUG] resolved path: D:/data\ledger\2015.ldg
83ms [DEBUG] Including: "D:/data\ledger\2015.ldg"
89ms [DEBUG] Master account:
92ms [INFO] Parsing file "D:/data\ledger\2015.ldg"
Any help fixing this issue will be greatly appreciated. Thanks.
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.