Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Create clobbers a concurrently-created file

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

The bug is in the create-file helper in Files.go, which overwrites a file that appeared while the user was on the confirmation prompt of the file edit tool. Start by reading that helper and the confirmation flow that calls it, then reproduce by creating the target file during the prompt. Done when a file that appeared during confirmation is either not overwritten or the user is warned first, for example through an O_EXCL open that returns an error. The issue leaves the approach open, so confirm the intended behaviour with the maintainer before choosing one.

Written by the indexing model from the issue text.

Description

bug

##What
Create a file is now under edit file tool. Therefore if a user creates a file while waiting in the confirmation stage it will clobber the file.

##Where
Files.go in createFilehelper

##What should happen

  • should have some recheck if the file has changed
  • prompt the user if there is content that will be overwritten
  • could implement a O_EXCL flag as well to get error if it appears during confirmation
Dominant language
Go
Stars
1
Forks
2
Avg merge
1h 46m
Merged PRs (30d)
6

Getting set up

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.

More from Edwin-metcalf/MetCode

All issues in Edwin-metcalf/MetCode

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.