gsantner / gsantner/markor

markor cannot write file back to droidFS

Open
#2,219 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
537
Avg merge
1d 18h
Merged PRs (30d)
4

Description

### ⚠️ This issue respects the following points: ⚠️

- [X] This is a **bug**. Not a [question or feature request](https://github.com/gsantner/markor/issues/new/choose).
- [X] The topic is **not** already reported at [Issues](https://github.com/gsantner/markor/issues?q=#js-issues-search). _(I've searched it)_.
- [X] Markor **is** up to date. See [Releases](https://github.com/gsantner/markor/tags) for the latest version. Updates are available from [F-Droid](https://f-droid.org/en/packages/net.gsantner.markor/) and GitHub.
- [x] The bug is still present in the latest development version (git master). (Please [download](https://nightly.link/gsantner/markor/workflows/build-android-project/master) and try the test version of Markor, named **Marder**. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor settings are not touched. In case the issue is resolved there, you don't need to create a bug report. The change will be part of the next Markor update.)

### Description

I enabled `Allow opening files with other applications` and `Grant write access`.
i try to add some text to a file with markor, but this does not really work. markor said file saved, but once I close the markor, the modification goes away indicate the file is never written/saved.

According to https://github.com/hardcore-sushi/DroidFS/issues/54

The author indicate this is a problem in markor.

I can actually save file with [SimpleTextEditor](https://f-droid.org/en/packages/com.maxistar.textpad/), which indicate this might be actually something inside markor.

But so far I cannot see any obvious reason from source code, since in the writeFile(), we do handle the isContentResolverProxyFile(), then try to write back with openOutputStream()

### Steps to reproduce

1. in droidFS `Allow opening files with other applications` and `Grant write access`
2. create an empty test.md in droidFS
2. choose the test.md and in menu select open with external apps
3. choose markor
4. add some text
5. save
6. return back to droidFS and open the file, we can see it is still empty

### Information

Android version: 13
Device: pixel 3a
App Version: 2.11.1

### Source

F-Droid

### Format / File type

Plaintext

### Additional info / Log

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Trace the writeFile() path for isContentResolverProxyFile(), focusing on the openOutputStream() write-back behavior described in the report. Reproduce the DroidFS external-open workflow, then verify that text saved in Markor remains present after closing Markor and reopening the file in DroidFS.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.