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 sometimes overwrites the file with some past content instead of accepting external changes #676

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: If the file content changes outside sleek, changes should be accepted by sleek.

Actual Behavior: If I edit the file content directly using a text editor, then sometimes sleek overwrites the content with previous content: image

Steps to Reproduce:

Hard to reproduce. Most time external changes are accepted by sleek, but sometimes sleek overwrites external changes.

Screenshots: See above

ransome1 commented 3 months ago

My gut tells me this going to be a complicated one, since we have plenty of variables here. Most likely some kind of file sync and at least one external editor or application, of which we don't know how it is writing the file.

The file watching module (chokidar) gives us a couple of settings here. sleek is currently using the default settings which work for the majority of setups. If a setup causes issues, it is my believe that the settings atomic, usePolling and interval as described here can solve this kind of issue. Especially usePolling is a good option in network settings, as stated in the documentation.

In v2.0.12-RC.4 sleek now contains a corresponding setting for each of those 3 chokidar settings. They are described in the wiki.

You might want to start activating the polling by changing fileWatcherPolling to true. And then start playing around with the fileWatcherPollingInterval setting.

Let's see if this changes anything on your side.

42web-ch commented 3 months ago

My gut tells me this going to be a complicated one, since we have plenty of variables here. Most likely some kind of file sync and at least one external editor or application, of which we don't know how it is writing the file.

The file watching module (chokidar) gives us a couple of settings here. sleek is currently using the default settings which work for the majority of setups. If a setup causes issues, it is my believe that the settings atomic, usePolling and interval as described here can solve this kind of issue. Especially usePolling is a good option in network settings, as stated in the documentation.

In v2.0.12-RC.4 sleek now contains a corresponding setting for each of those 3 chokidar settings. They are described in the wiki.

You might want to start activating the polling by changing fileWatcherPolling to true. And then start playing around with the fileWatcherPollingInterval setting.

Let's see if this changes anything on your side.

Thanks for the information. I am added this "Polling" staff to my config. Now im testing..

~/.var/app/com.github.ransome1.sleek/config/sleek/userData/config.json Can you please add the directory of flatpak config to this wiki page

ransome1 commented 3 months ago

Can you please add the directory of flatpak config to this wiki page

:white_check_mark:

Thanks for the information. I am added this "Polling" staff to my config. Now im testing..

@42web-ch Any update so far?

42web-ch commented 3 months ago

@42web-ch Any update so far?

Yes. For now, i never had again e issue. Thanks for the support. :)