Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inital release of Telegram Desktop cleaner #270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tobias-B-Besemer
Copy link
Contributor

Should bring big benefits! E.g. in my case the folder "cache" have more then 160MB and more then 15.500 files !!! Should also be a big privacy benefit! The file names in "cache" are encrypted and have always random 12 letters and no extension and should also just partial files... but for a person with forensic knowledge it shouldn't be to difficult (also because code to Tg Desktop is OSS) to restore e.g. all the pictures which was shown to a user... As Tg is now a really famous messaging app and it seems this data doesn't get deleted by other solutions such as WinApp2.ini, I would suggest to move this cleaner soon (for BB3.2/4.0?) into the release (stable)...
Coded this cleaner ASAP in the last minutes... so haven't really tested him, yet! Hope maybe a other person interested in the BB project will do it soon...

<!-- Not yet figured out! -->
<!-- Windows: -->
<action command="delete" search="walk.all" path="%AppData%\Telegram Desktop\tdata\user_data\cache"/>
<action command="delete" search="glob" path="%AppData%\Telegram Desktop\tdata\user_data\cache\*"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This glob line looks redundant to the walk.all above it

Copy link
Contributor Author

@Tobias-B-Besemer Tobias-B-Besemer Nov 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hadn't we noted in the docs, that if I want to delete the content of a folder including all sub-folders, I have to use ATM "walk.all" followed by "glob"? Read that so in the doc, again...
This was AFAIK also the reason you introduced "walk.top" in BB3.0...
I noted in the doc to it:

Starting with BleachBit v3.0 there is command="delete" search="walk.top" as a single command to do that!
But as some users still stay on Windows XP with BleachBit v2.2 (last version for WinXP) but use new cleaners, it is highly recommended to use this new feature at the moment with care!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To accomplish this goal, change glob to file and change cache\* to just cache. As it is, I think it won't delete the cache directory itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, my solution deletes all in the "cache" folder and your solution would delete the "cache" folder itself...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched in "stable" for an example, but can't find one... The only example I found now (first hit) is this one: https://github.com/az0/cleanerml/blob/master/pending/windows_recycle_bins_more.xml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to delete the top directory, I would use walk.top.

Yes, feel free to take a break! You work faster than I do :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for the compliment! :-) But the harder Python part still remains to you... ;-)

Yeah, seems that's the prob! I just want to delete the complete content incl. the sub-folders of the folder!
And I think I can remember that we had a other solution to accomplish this goal, too, but with the solution I documented and used now, the cleaning of the files is better displayed and/or calculated in BB because BB deletes them all step by step and displays and calculates it! ;-)

I make now a test run with the cleaner and makes some screenshot of the folder & content & BB output during this for you. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here some SS...

The folder "cache" have just one sub-folder in my case...

2019-11-14 07_24_49-C__Users_Administrator_AppData_Roaming_Telegram Desktop_tdata_user_data_cache

...but in this sub-folder there are 257 (!!!) more sub-folders that include the >15.500 files !!!

2019-11-14 07_25_08-C__Users_Administrator_AppData_Roaming_Telegram Desktop_tdata_user_data_cache_0

First a test of deleting the log file...

2019-11-14 08_18_09-BleachBit

...then a test of deleting the "Memory Dumps"...

2019-11-14 08_21_11-BleachBit

...and then the cleaning of the cache folders...
...but as you can see: It run into an Error 1 !!!

2019-11-14 08_35_01-BleachBit

Here is a SS from the debugging window:

2019-11-14 08_36_34-Administrator_ C__Windows_system32_cmd exe - bleachbit_console exe  --gui --debu

But the cache folder is empty as intended !!!

2019-11-14 08_38_25-C__Users_Administrator_AppData_Roaming_Telegram Desktop_tdata_user_data_cache

...so I have no clue what the "Error 1" should mean!

Note: There are maybe some space for improvements of the cleaner regarding the strings used...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't understand

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, which part?

The cleaner works like intended, but I get a error 1.

<action command="delete" search="walk.all" path="%AppData%\Telegram Desktop\tdata\user_data\cache"/>
<action command="delete" search="glob" path="%AppData%\Telegram Desktop\tdata\user_data\cache\*"/>
<action command="delete" search="walk.all" path="%AppData%\Telegram Desktop\tdata\user_data\media_cache"/>
<action command="delete" search="glob" path="%AppData%\Telegram Desktop\tdata\user_data\media_cache\*"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This glob line looks redundant to the walk.all above it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at my comment above, plz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants