oldj / oldj/SwitchHosts

提一个非常低级的bug

Open
#369 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
27.2k
Forks
2.7k
Avg merge
5h 44m
Merged PRs (30d)
3

Description

System (Mac, Windows 7/8/10, Linux) / 操作系统

win10 1903

SwitchHosts! Version / SwitchHosts! 版本

最新版

Description / 描述

无法修改hosts,提示用管理员运行

How to reproduce / 重现步骤

这是一个非常低级的bug,只要任何软件或者手动把hosts文件修改为只读,那么就算你折腾到死,也无法修改。。。。。我当时也是各种设置,各种设置权限,各种折腾,最后发现是这个只读属性导致的。。。实在是不应该,浪费了一堆时间。发现不能写的话,尝试设置可读权限,然后再写,很简单吧,2行代码解决。

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 reproducing issue 369 on Windows with the hosts file marked read-only, then locate the hosts-file write path in the application. Verify the current permission and write behavior, and consider the issue complete when a read-only hosts file can be handled without incorrectly requiring administrator access.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.