-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.8.2: ShareInto/QuickNote Markor not saving #1482
Comments
Relevant code I don't see an obvious bug in the code On fail we return content = "" I think it would be better to not hide the exception and force the calling code to handle an exception. That way, we can prevent writes if there was an exception on read. I can reproduce this issue. |
I'm setting up android dev on a new OS. As far I read there is also an issue with QuickNote/todo.txt/Main page, so might be outside the ShareIntoFragment hehe, once more "we don't save empty files, too much tears about lost files" 😃 though I had tried main page, sharing stuff, creating new files, editing files...haven't had the case |
Sigh. I'll look into solving the root cause in the evening Will also add the empty files logic back in |
thanks for your quick help I finished downloading android sdk now ... also working on it merged comments a little |
@harshad1 I can only reproduce an issue when selecting some a file from filemanager in the popup dialog, from i.e. recent/popular files. So what @Ssmur described, but not #1483 . This problem may stem from this: File::write might be still doing stuff on low level I/O, which we don't notice. And when we immediately open the file while this in progress, it possibly is still empty at that point. screenrecord-2021-11-04_20.08.49.mp4 |
@Ssmur @kylesorkness @harshad1 https://github.com/gsantner/markor/actions/runs/1422885489 |
Yeah. I am seeing this too. It may be possible to address this by making the IO functions static? That way the |
new insight: document is transferred from ShareInto, it has modTime set from the time of adding the additional text. when document.read call is running at the DocumentEditor, it sees file was already read (modTime == current file.modTime()) and it not read again as expected. (Per se ok, just that the texteditor is empty, and no file was read previously at THIS editor) ---> added resetting of modTime prior passing on to DocumentEditor initializer. |
@gsantner This is now solved right? |
General information
Description
Today I've updated Markor (2.8.1) to (2.8.2).
In Firefox, press Share button to save URL, paste the note on a large file I have of links saved, and Markor when ask where to insert the note, I choose that file (bookmarksff.md) and open the file cmpletly erased everything, 0 bytes. I have create other dummy file (markdown), write something random, Save, close file and open it again, there are the text. I repeat the process of save a Url from Firefox to Markor and choose that dummy file, and again, the file auto-delete its content, does not even enter the Url I want to save.
I wil try with a Xiaomi 6a, and update the result.
[UPDATE] Well, in a Xiaomi 6a Stock rom MIUI 11.0.8 reproduces the same behaviour. In this case, I open a app of F-Droid catalog, press ShareInto button, select Markor, select file of notes and got erased its content.
The text was updated successfully, but these errors were encountered: