• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

datatug / datatug-core / 37274900850
100%

Build:
DEFAULT BRANCH: main
Ran 05 Oct 2026 06:56AM UTC
Jobs 1
Files 152
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Oct 2026 06:55AM UTC coverage: 100.0%. Remained the same
37274900850

push

github

web-flow
fix(filestore): write only plain files in plain folders of the project (#345)

The file store writes only plain files in plain folders of the project: it does not write through a link.

What changes
- New `internal/plainfs`: one small set of functions (`MkdirAll`, `CreateFile`, `WriteFile`, `Remove`, `RemoveAll`) that walk from the project folder down to the target with `Lstat`, refuse a folder that is a link or not a plain folder, refuse a target that exists and is not a plain file, open the file with `O_NOFOLLOW` where the platform has it (every Unix; Windows relies on the `Lstat` check, which also refuses a junction), and return every error. A refusal wraps `plainfs.ErrNotPlain` and names the path inside the project.
- Every write and delete of a project file or folder in `pkg/storage/filestore` goes through it: the project file and README, environments, environment catalogs and servers, DB models, boards, entities, folders, recordset definitions, DB drivers, servers and catalogs, the README helper, and the storage `WriteFile` used by the project creator. `saveJSONFile` now returns the error of the create, of the encode and of the close. Query writes already refuse links through their own location walk; tests now cover them with the other kinds.
- A path that leaves the project (for example a folder path with `..`) is refused.
- Reads are unchanged. No exported signature changes.

Tests
- For each kind of file the store writes: a link in the file's place (live and dangling) and a link in each folder above it, each pointing outside the project; the write is refused, the outside tree is hash-identical afterwards and nothing new exists outside. The same for deletes.
- A save of a whole small project writes a tree with the same content hash as before this change.
- Link tests skip on Windows with a message saying why; `internal/plainfs` covers the refusal there with a fake `Lstat`.
- Coverage stays at 100%.

Behaviour change
- A write or a delete whose... (continued)

183 of 183 new or added lines in 19 files covered. (100.0%)

11032 of 11032 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 37274900850.1 05 Oct 2026 06:56AM UTC 152
100.0
GitHub Action Run
Source Files on build 37274900850
  • Tree
  • List 152
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • af45a1f2 on github
  • Prev Build on main (#37251498670)
  • Next Build on main (#37311120728)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc