mirror of
https://github.com/zrepl/zrepl.git
synced 2025-06-29 06:01:24 +02:00
zfs: allow spaces in zfs names.
Space is a allowed character in zfs names accoring to https://github.com/zfsonlinux/zfs/issues/439.
This commit is contained in:
parent
c7f0f779b1
commit
302d77cf4a
@ -108,7 +108,13 @@ func NewDatasetPath(s string) (p *DatasetPath, err error) {
|
||||
return p, nil // the empty dataset path
|
||||
}
|
||||
const FORBIDDEN = "@#|\t<>*"
|
||||
if strings.ContainsAny(s, FORBIDDEN) { // TODO space may be a bit too restrictive...
|
||||
/* Documenation of allowed characters in zfs names:
|
||||
https://docs.oracle.com/cd/E19253-01/819-5461/gbcpt/index.html
|
||||
Space is missing in the oracle list, but according to
|
||||
https://github.com/zfsonlinux/zfs/issues/439
|
||||
there is evidence that it was intentionally allowed
|
||||
*/
|
||||
if strings.ContainsAny(s, FORBIDDEN) {
|
||||
err = fmt.Errorf("contains forbidden characters (any of '%s')", FORBIDDEN)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user