jermp / tongrams

A C++ library providing fast language model queries in compressed space.
MIT License
128 stars 20 forks source link

sort_grams - found the bug causing the exception #3

Closed ndvbd closed 5 years ago

ndvbd commented 5 years ago

Apparently, sort_grams fails when the 3rd argument is a full path of file. So doing

./sort_grams 1-grams.sorted.gz 1-grams.sorted.gz 1-grams.sorted.again.txt

Works, but

./sort_grams 1-grams.sorted.gz 1-grams.sorted.gz /usr/tongrams/1-grams.sorted.done.txt

Fails with

terminate called without an active exception
Aborted (core dumped)
jermp commented 5 years ago

Well, it is not a bug. Because probably you do not have permissions to write to the file /usr/tongrams/1-grams.sorted.done.txt

ndvbd commented 5 years ago

I have permissions. It's on every directory. If I run the executable from within the directory it works, if I give the exact file with full path it doesn't

jermp commented 5 years ago

Ok, fixed.

ndvbd commented 5 years ago

@jermp thanks!