Preferences can be changed while a clean is running

Aperta
#2,553 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
desktop

Direzione di ricerca

Start in the GUI handler cb_preferences_dialog and the refuse_if_busy check that the other menu actions already use. Then read delete() in FileUtilities.py, which reads options.get('shred') per file, and whitelisted_posix()/whitelisted_windows(), which read options.get_whitelist_paths() per file. Done means Preferences either refuses to open or opens read-only while a clean runs, or the per-file settings are fixed for the length of the run. The maintainer's comment leaves the choice between those two open, so confirm it before writing code.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug gui

The menu stays usable while a preview or clean runs. Shred, wipe free space, paste and drag and drop refuse with "Wait for the current operation to finish.", but Preferences still opens and saves.

Some settings are read for every file during the clean, so a change applies to the rest of the run:

  • "Overwrite contents of files to prevent recovery": delete() checks options.get('shred') per call (FileUtilities.py), so turning it on halfway shreds the remaining files, and turning it off stops shredding.
  • Keep list: whitelisted_posix()/whitelisted_windows() read options.get_whitelist_paths() per file, so a path added mid-clean may or may not be kept depending on timing.

To reproduce: start a clean with many files, open Preferences, toggle "Overwrite contents", look at the log.

Maybe the easiest fix is to call refuse_if_busy() in cb_preferences_dialog like the other menu actions. Or open it read-only during a clean.

Noticed it in #1184.

Opening for tracking, I'll try to fix it at some point.

Lingua principale
Python
Stelle
7.1k
Fork
458
Merge medio
2g 11h
PR unite (30g)
40

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bleachbit/bleachbit

Tutte le issue di bleachbit/bleachbit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.