Skip to content

Save a old file after sudo hx file.txt will change its owner #14645

@jonirrings

Description

@jonirrings

Summary

the owner of file will be changed if the original owner is not root,

Reproduction Steps

I tried this:

  1. create a normal file with non-root user,touch file.txt
  2. check its owner and group
  3. edit it with sudo hx file.txt and save it
  4. check its owner and group again

I expected this to happen:
new owner and old owner is the same

Instead, this happened:
new owner is root, instead of old owner

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

Linux

Terminal Emulator

ptyxis

Installation Method

release page

Helix Version

helix 25.07.1 (a05c151)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions