ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.28k stars 99 forks source link

sleek is often loosing the files #675

Closed aisbergde closed 3 months ago

aisbergde commented 3 months ago

Bug Report

Important

Please follow this template strictly when reporting bugs.

Reports that do not adhere to this template will not be addressed and will be closed.

App Version: information not available in the app

Platform: Windows

Installation Method: App Store

Expected Behavior: File should stay "active" in sleek.

Actual Behavior: sleek is often loosing the files. And then I need to open the file again. sleek also doesn't remember anything. I just get: image

Also the done.txt will lost.

Steps to Reproduce:

it is hard to reproduce, it just happens. I installed sleek today from the app store and it happened several times. Sometimes the file keeps for some hours, sometimes keep looses the file after some minutes.

The files are located in a folder, which is synchronized with my Synology NAS using "Synology Drive"

Screenshots: see above

I used sleek in the past on another PC and it worked fine.

ransome1 commented 3 months ago

This is most likely connected to the file sync.

If for example your file sync works in a way that it removes and file and then re-adds it, and there is a gap between those two events, sleeks file watcher (chokidar) understands this as an unlink event rather than a change event. And this then removes the file.

I will add a hidden setting in the next release, that let you decide the threshold time in ms. chokidars default is 100ms, I will lift it to 1000ms as a default and you can play around with it by adding this setting fileWatcherAtomic. It accepts an integer.

RobLW commented 3 months ago

This is most likely connected to the file sync.

If for example your file sync works in a way that it removes and file and then re-adds it, and there is a gap between those two events, sleeks file watcher (chokidar) understands this as an unlink event rather than a change event. And this then removes the file.

I will add a hidden setting in the next release, that let you decide the threshold time in ms. chokidars default is 100ms, I will lift it to 1000ms as a default and you can play around with it by adding this setting fileWatcherAtomic. It accepts an integer.

Sorry if the answer to this question is obvious. When you say you'll add a hidden setting, where will we need to go in order to alter it please?

I'm also experiencing this problem with files stored on my local drive. Thanks, really looking forward to the next release.

ransome1 commented 3 months ago

@RobLW I have not yet found the time to create a new pre-release. Once this has been released you can add the setting (described here) in the config.json file, which is located in your user data folder. This link helps you finding it: https://github.com/ransome1/sleek/wiki/User-data-folder-location

ransome1 commented 3 months ago

@RobLW @aisbergde this setting can be tested in the latest pre-release. Let me know, if this can solve the issue at hand.

aisbergde commented 3 months ago

I could not reproduce the issue in the last few days. There was one day, when it happened several times, and there are other days, where the connection is stable.

ransome1 commented 3 months ago

If this happens in v2.0.12 despite the new settings, feel free to report back here.