Closed J70P closed 2 years ago
This bug annoys me because I have a todo application on PC that synchronizes with the todo.txt and done.txt files, but:
The only way to have a non-corrupted done.txt is to delete it after each archiving.
I'm guessing this must be caused by https://github.com/mpcjanssen/simpletask-android/commit/e1f4550b6d54bedc9b3d3b986eaf943ea1d44a35#diff-e2fcf25ef113c13520402bbd7354a44fe22db1abe34fa09435b693d879c08751L106-R106, it's the only related piece of code that has changed in the last few years.
@regexgit what OS are you using on the PC?
Both linux and windows but there is no \r or \n at all, here is an exemple with 2 completed tasks Test1 and Test2 in done.txt, I checked in hex editor on android: there is no character between the 2 tasks:
x 2022-09-06 Test1x 2022-09-06 Test2
Just to confirm, if you follow these steps:
2022-09-06 Test1
2022-09-06 Test2
2022-09-06 Test3
Test1
Test2
and Test3
at the same timeIs the result:
This:
x 2022-09-06 Test1x 2022-09-06 Test2
x 2022-09-06 Test3
Or this:
x 2022-09-06 Test1x 2022-09-06 Test2x 2022-09-06 Test3
If I understood the description above correctly, it's (1).
Yes, case 1
I think I know what's happening. The appendToFile function doesn't add a trailing eol
so the next archive will be joined in the same line.
@regexgit cloudless builds at https://mpcjanssen.nl/artifacts/master/ have this issue fixed
Hello,
version 11.0.0 cloudless stores all completed tasks in one line at the end of done.txt.
Example:
testing due:2022-07-23
goes into done.txt as "x 2022-07-23 testing due:2022-07-23" at the end of the last line in done.txt.
If it's important, I have disabled "Windows-friendly line breaks".