Skip to content

Use '~' prefix instead of '%' for random brushes #362

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

Merged

Conversation

akien-mga
Copy link
Contributor

Fixes #337.

It's not necessarily the best fix but according to https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words ~ doesn't seem to be reserved, so it might be a safer bet.
It works for me on Linux but I haven't tried other OSes to confirm.

Note that a ~ suffix is used by some code editors to mark backup versions of changed files, which might be a source of confusion (but does show that ~ in filenames seems to be safe). It doesn't seem to conflict with ~ that expands to $HOME, at least in bash, as long as you don't use ~ alone or with ~/somepath.

@akien-mga
Copy link
Contributor Author

akien-mga commented Oct 21, 2020

Note also that this would break compatibility for users who currently rely on the % prefix, who would need to rename their brushes. This could be improved to keep support for both prefixes (should be easy), or as mentioned in #132 (comment), the whole system could be changed to something a bit more advanced.

I'm completely fine with this not being merged as is, I use it for my distro package as a workaround but it's fine with me if another, longer term solution is worked on for #337.

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to fix this. We will most likely change how the brush system works, although I'm not sure yet how it will be and when it will happen, but for now this PR will do!

@OverloadedOrama OverloadedOrama merged commit d41751d into Orama-Interactive:master Oct 21, 2020
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.

Brush filenames with '%' trigger rpmlint warning when packaging Pixelorama as RPM
2 participants