-
Notifications
You must be signed in to change notification settings - Fork 48
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
Tobias-B-Besemer
wants to merge
1
commit into
bleachbit:master
Choose a base branch
from
Tobias-B-Besemer:Telegram-Desktop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
|
||
BleachBit | ||
Copyright (C) 2008-2019 Andrew Ziem | ||
https://www.bleachbit.org | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
@app Telegram Desktop | ||
@url https://desktop.telegram.org/ | ||
@os Windows, Linux, macOS | ||
@cleanerversion v1.0.0 | ||
@cleanerdate 2019-11-14 | ||
@cleanerby Tobias B. Besemer | ||
@tested ok v???, Windows ??? | ||
@testeddate ??? | ||
@testedby ??? | ||
@note Linux $$ProgramFiles$$ not yet figured out! I will do this later! Tobias. | ||
|
||
--> | ||
<cleaner id="telegram_desktop"> | ||
<label>Telegram Desktop</label> | ||
<description>Messaging program</description> | ||
<!-- Not yet figured out: | ||
<running type="exe" os="linux">telegram</running> | ||
--> | ||
<running type="exe" os="windows">Telegram</running> | ||
<option id="log"> | ||
<label>Log</label> | ||
<description>Delete the log</description> | ||
<!-- Linux: --> | ||
<!-- Not yet figured out! --> | ||
<!-- Windows: --> | ||
<action command="delete" search="file" path="%AppData%\Telegram Desktop\log.txt"/> | ||
<!-- macOS: --> | ||
<!-- Not yet figured out! --> | ||
</option> | ||
<option id="memory_dumps"> | ||
<label>Memory Dumps</label> | ||
<description>Delete the files</description> | ||
<!-- Linux: --> | ||
<!-- Not yet figured out! --> | ||
<!-- Windows: --> | ||
<action command="delete" search="walk.all" path="%AppData%\Telegram Desktop\tdata\dumps"/> | ||
<!-- macOS: --> | ||
<!-- Not yet figured out! --> | ||
</option> | ||
<option id="cache"> | ||
<label>Cache files</label> | ||
<description>Delete the cache files</description> | ||
<!-- Linux: --> | ||
<!-- 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\*"/> | ||
<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\*"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This glob line looks redundant to the walk.all above it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Look at my comment above, plz. |
||
<!-- macOS: --> | ||
<!-- Not yet figured out! --> | ||
</option> | ||
</cleaner> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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
tofile
and changecache\*
to justcache
. As it is, I think it won't delete thecache
directory itself.There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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. :-)
There was a problem hiding this comment.
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...
...but in this sub-folder there are 257 (!!!) more sub-folders that include the >15.500 files !!!
First a test of deleting the log file...
...then a test of deleting the "Memory Dumps"...
...and then the cleaning of the cache folders...
...but as you can see: It run into an Error 1 !!!
Here is a SS from the debugging window:
But the cache folder is empty as intended !!!
...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...
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.