whitelist does not resolve symlinks

Bug #1455959 reported by Vladimir Chapaikin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BleachBit
Fix Released
Medium
Unassigned

Bug Description

System: KUbuntu

[Assumptions]

User login: A_USER
Computer's name (host name): A_COMPUTER

[Steps to reproduce]

1. Execute the commands in terminal (bash):

mkdir /tmp/a
ln -s /tmp/a /home/A_USER/.kde/tmp-A_COMPUTER/b
echo >/tmp/a/file

2. Start bleachbit.
3. Add "/tmp/a/file" to whitelist of bleachbit.
4.1. Choose to clean OS's temporary files.
4.2. Choose to clean KDE's temporary files.
5. Start a cleaning process.

6. [Bug] The whitelisted file "/tmp/a/file" does not exist.

[A desired behaviour]

6. The whitelisted file "/tmp/a/file" exists.

____________________
Reproduced on: KUbuntu 14.04, 64-bit

Tags: whitelist
Changed in bleachbit:
importance: Undecided → Medium
milestone: none → 1.14
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Note to self

os.path.realpath(path)

Return the canonical path of the specified filename, eliminating any symbolic links encountered in the path (if they are supported by the operating system).

https://docs.python.org/2/library/os.path.html#os.path.realpath

Andrew Ziem (ahziem1)
Changed in bleachbit:
status: New → In Progress
Andrew Ziem (ahziem1)
summary: - Bleachbit does not check actual identity of whitelisted files and files
- to be deleted
+ whitelist does not resolve symlinks
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Fixed in Git commit 8706521113bf2530dfcb70db74456b8f37330c12 for next release

Thank you for the bug report!

Changed in bleachbit:
status: In Progress → Fix Committed
Revision history for this message
Andrew Ziem (ahziem1) wrote :
Changed in bleachbit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.