-
Notifications
You must be signed in to change notification settings - Fork 83
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
Escape special characters in beer name #29
Comments
Elco, I did a little more research on this- The issue, on *nix atleast, is only the / and \0 characters (the only non-allowed characters in a file path, which is the error being generated). When the script tries to write the beer name My/Beer, BrewPi uses the name as part of the filename /the/path/to/My/Beer - you can see how BrewPi then gets confused: and \ are fine as far as I can tell (and research suggests they should be):Jul 10 2014 20:57:06 Notification: Restarted logging for beer 'omg###'. I'm patching to simply replace the / with a _ . It is not possible to escape a / in a filepath in *nix. The PR is on its way Note: When it comes to Windows, there's TONS of disallowed chars, and even combos of chars, and would probably need a re-write of how we store data files to properly address that. For now, adding a note in the docs (or on the UI) is likely the best use of time. |
Issue BrewPi#29 We use the beer name as part of the file path for saving data... no problems there if we use MyBeer as a name, the path is /path/to/MyBeer . However, if we use My/Beer as the name, the filepath becomes /path/to/My/Beer and breaks everything. We simply replace / with _ to avoid this problem. Note- Windows has a TON of restricted chars and COMBOS of chars that are restricted, but not addressed in this patch.
Script crashes when slashes or # is used in the beer name.
The text was updated successfully, but these errors were encountered: