Launcher: install, repair and update can delete or overwrite a file replaced after the backup

Aberta
#185 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
25/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
cpp
Domínio
desktop

Direção de pesquisa

Start with the install, repair and update paths in clean/installer/src/wg_core/install.cpp (lines 788-838) and the helpers in util.cpp (lines 120-149), where the backup is hashed and verified before the target is acted on by path. Trace where the disable target is deleted, the rename destination is removed, and MOVEFILE_REPLACE_EXISTING or CopyFileW(..., FALSE) is used. Done means the target is held or created fail-if-present through the action, so a file replaced after the backup is detected and kept, with race tests covering the whole operation.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area: launcher bug

Install, repair and update (clean/installer/src/wg_core/install.cpp:788-838, util.cpp:120-149) hash and verify a backup, then act on the target by path: they delete a disable target, delete a rename destination, and write payloads with MOVEFILE_REPLACE_EXISTING or CopyFileW(..., FALSE).

If another program replaces the target after the backup, or creates a target that was absent, the new file is deleted or overwritten while the backup holds the old bytes. This also covers repair and update after a restore, and the FSR rename-aside.

Expected: hold and verify the destination through the action (one handle), or create with fail-if-present, so a replacement is detected and kept. Needs race tests across the whole operation.

Found in the review of #47.

Linguagem predominante
C++
Estrelas
12
Forks
2
Merge médio
3h 10min
PRs com merge (30d)
171

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de phantoslayer21/wronggpu

Todas as issues de phantoslayer21/wronggpu

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.