mirror of
https://github.com/zrepl/zrepl.git
synced 2025-08-18 02:39:46 +02:00
zfs: bookmark / replication cursor: handle spaces in ds names correctly
fixes #131
This commit is contained in:
@@ -924,7 +924,7 @@ func ZFSGet(fs *DatasetPath, props []string) (*ZFSProperties, error) {
|
||||
return zfsGet(fs.ToString(), props, sourceAny)
|
||||
}
|
||||
|
||||
var zfsGetDatasetDoesNotExistRegexp = regexp.MustCompile(`^cannot open '(\S+)': (dataset does not exist|no such pool or dataset)`)
|
||||
var zfsGetDatasetDoesNotExistRegexp = regexp.MustCompile(`^cannot open '([^)]+)': (dataset does not exist|no such pool or dataset)`)
|
||||
|
||||
type DatasetDoesNotExist struct {
|
||||
Path string
|
||||
@@ -1080,6 +1080,8 @@ func ZFSBookmark(fs *DatasetPath, snapshot, bookmark string) (err error) {
|
||||
snapname := zfsBuildSnapName(fs, snapshot)
|
||||
bookmarkname := zfsBuildBookmarkName(fs, bookmark)
|
||||
|
||||
debug("bookmark: %q %q", snapname, bookmarkname)
|
||||
|
||||
cmd := exec.Command(ZFS_BINARY, "bookmark", snapname, bookmarkname)
|
||||
|
||||
stderr := bytes.NewBuffer(make([]byte, 0, 1024))
|
||||
|
Reference in New Issue
Block a user