mirror of
https://github.com/restic/restic.git
synced 2025-04-26 16:00:56 +00:00
mount: append repository ID to FS name of FUSE mount
* update review comments mount: append repository ID to FS name of the FUSE mount
This commit is contained in:
parent
3d14e92905
commit
88b599c4f3
@ -5,6 +5,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -148,9 +149,11 @@ func runMount(ctx context.Context, opts MountOptions, gopts GlobalOptions, args
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fuseMountName := fmt.Sprintf("restic:%s", repo.Config().ID[:10])
|
||||||
|
|
||||||
mountOptions := []systemFuse.MountOption{
|
mountOptions := []systemFuse.MountOption{
|
||||||
systemFuse.ReadOnly(),
|
systemFuse.ReadOnly(),
|
||||||
systemFuse.FSName("restic"),
|
systemFuse.FSName(fuseMountName),
|
||||||
systemFuse.MaxReadahead(128 * 1024),
|
systemFuse.MaxReadahead(128 * 1024),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user