Comments (2)
I thought a solution could be to separate win/linux cleaners by setting
<cleaner id="virtualbox" os="windows">
and<cleaner id="virtualbox" os="linux">
.
But if I do that and both files are in the cleaners folder (on Windows) both actions are run. Resulting in the same issue.
I imagine having multiple cleaners with the same id could be problematic. Also, I'm not sure if using Linux paths on windows is intentional or not. The documentation under "Testing the cleaner" says to never use ~
in windows. Yet, the gimp cleaner uses it and otherwise wouldn't currently be working on windows. A clarification on this matter has been requested in launchpad #1366662. Until this behaviour is clarified, I wouldn't make or accept any pull requests related to this issue; You're proposing a pretty big change to how cleaners are written when it might just be a simple bug that lets ~
or /
be used on windows.
If we are going to separate actions based on os via CleanerML though, I suggest something like this:
<cleaner id="foo">
<label>bar</label>
<description>baz</description>
<option id="logs">
<label>Logs</label>
<description>Delete the logs</description>
<group os="linux">
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
</group>
<group os="windows">
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
<action command="delete" search="walk.files" path="..."/>
</group>
</option>
</cleaner>
Possibly along with:
<cleaner id="foo">
<label>bar</label>
<description>baz</description>
<option id="logs">
<label>Logs</label>
<description>Delete the logs</description>
<action os="linux" command="delete" search="walk.files" path="..."/>
<action os="windows" command="delete" search="walk.files" path="..."/>
</option>
</cleaner>
for small options with only a couple actions.
This way we wouldn't need to create a new cleaner.xml file for each os, thus the cleaner id, labels, descriptions, and option id's would all be reused, keeping the code DRYer.
I'd like to hear @az0's take on this though.
from bleachbit.
In general specifying a path for the operating system (e.g., such as ~/.config/..
on Windows) is harmless because it does not exist. There is a tiny performance penalty checking whether the file exists. This is how things have worked so far.
Recent commits have added multi-value variables that support the DRY principle that @tiemay mentioned.
Still, I'll add a os= option for action.
from bleachbit.
Related Issues (20)
- HOw do I get help? msvcr100.dll HOT 1
- Update error appears in Bleachbit app window when starting it with update option enabled HOT 4
- Ubuntu error appears when running Preview after selecting all options in Blechbit app HOT 2
- Please add select all option in Bleachbit app window
- Bleachbit app hanged when running Clean operation with selected all options after Preview was completed on Ubuntu 20 HOT 2
- Missing Company Name in bleachbit.exe Digital Certificate Causes Issue with Software Updater
- Windows long paths (paths > 260 characters) do not appear to be cleared
- Question on intended refactoring and code quality improvements: minimum supported python version? HOT 1
- Add a custom cleaner to clear cache for all flatpak applications HOT 1
- Opera Browsing History Not Deleted On BleachBit version 4.6.0
- Random GUI crash on Win 10? HOT 3
- Custom cleaner fails to find files when walking a directory tree. Files are found when walking similar tree
- MSVCR100.dll error HOT 5
- Just an FYI -- Easy Fix HOT 1
- Not possible to set/select a language. Ini settings not respected.
- Bleachbit 4.60 Errors HOT 3
- Syntax warnings in BleachBit 4.6.0-1 on Ubuntu 24.03 HOT 2
- App;ication was unable to start properly. Error code: 0xc000007b HOT 5
- Progress bar HOT 2
- Donations Link On Site Fails - I wanna buy you a beer and cant
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bleachbit.