lib/versioner: Minor fixes in comments and error message (#9031)
* lib/versioner: Factor out DefaultPath constant. Replace several instances where .stversions is named literally to all use the same definition in the versioner package. Exceptions are the packages where a cyclic dependency on versioner is impossible, or some tests which combine the versions base path with other components. * lib/versioner: Fix comment about trash can in simple versioner. * lib/versioner: Fix wrong versioning type string in error message. The error message shows the folder type instead of the versioning type, although the correct field is used in the comparison.
This commit is contained in:
@@ -293,7 +293,8 @@ func NewFilesystem(fsType FilesystemType, uri string, opts ...Option) Filesystem
|
||||
// root, represents an internal file that should always be ignored. The file
|
||||
// path must be clean (i.e., in canonical shortest form).
|
||||
func IsInternal(file string) bool {
|
||||
// fs cannot import config, so we hard code .stfolder here (config.DefaultMarkerName)
|
||||
// fs cannot import config or versioner, so we hard code .stfolder
|
||||
// (config.DefaultMarkerName) and .stversions (versioner.DefaultPath)
|
||||
internals := []string{".stfolder", ".stignore", ".stversions"}
|
||||
for _, internal := range internals {
|
||||
if file == internal {
|
||||
|
||||
Reference in New Issue
Block a user