openmultiplayer / openmultiplayer/open.mp

`ftouch` clobbers files

Open
#770 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug nightly
Dominant language
C++
Stars
641
Forks
208
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The touch utility is meant to merely update a file's modified time, or create it if it doesn't exist, with no changes to the contents. ftouch should do the same, but seems to clobber the file contents. Really a pawn-lang bug.

To Reproduce

new File:f = fopen("moo.txt", io_write);
fwrite(f, "hi");
fclose(f);
ftouch("moo.txt");

Expected behavior

File contents should remain.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ftouch entry point and tracing how it opens the path, using the provided Pawn reproduction as the first test case. Done means existing file contents remain unchanged while the expected file-touch behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.