File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const (
1818
1919// NewDiskHandle creates on-disk data persistence handle
2020func NewDiskHandle (path string ) (Handle , error ) {
21- err := checkStoragePermission (path )
21+ err := CheckStoragePermission (path )
2222 if err != nil {
2323 return nil , err
2424 }
@@ -152,7 +152,8 @@ func (ds *diskPersistence) getStorageCurrentDirPath() string {
152152 return fmt .Sprintf ("%s/%s" , ds .dataDir , currentDir )
153153}
154154
155- func checkStoragePermission (dirBasePath string ) error {
155+ // CheckStoragePermission returns an error if we don't have both read and write access to a directory.
156+ func CheckStoragePermission (dirBasePath string ) error {
156157 _ , err := ioutil .ReadDir (dirBasePath )
157158 if err != nil {
158159 return fmt .Errorf ("cannot read from the storage directory: [%v]" , err )
You can’t perform that action at this time.
0 commit comments