G-Node / G-Node/gogs

Cannot edit annexed text file with WebUI (but edit the pointer file instead!)

Open
#134 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16
Forks
15
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

The WebUI conveniently allows to edit any text file (xml, markdown, etc.) online, but when the file content is annexed, the pointer file or symlink target is loaded in the online Editor instead of the actual content.

**GIN version**
[gin-live-2020-10-24](https://github.com/G-Node/gogs/tree/gin-live-2020-10-24)

**To Reproduce**
1. Create a repo with some annexed text file :
```
mkdir annexed-text ; cd annexed-text
gin create --here annexed-text "Repo with annexed text files"
echo "This file should be editable using the WebUI" > README.md
git annex add README.md
gin commit -m "initial commit" .
gin upload .
```
2. Open WebUI, go to repo main page, click on `README.md`: the annexed content is correctly displayed
![image](https://user-images.githubusercontent.com/64643044/200765790-36f6c399-cdb7-4982-95f9-fe916940c2b9.png)

3. Then click on "Edit this file" button at the right: **the content of the pointer file is loaded and can be modified**.
![image](https://user-images.githubusercontent.com/64643044/200765957-08a73566-8443-4716-9bfc-9d2e562ec469.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.