aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/config.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/config.go b/modules/config.go
index ada39cc1f..04bf1b422 100644
--- a/modules/config.go
+++ b/modules/config.go
@@ -402,11 +402,8 @@ func (m Mount) Component() string {
}
func (m Mount) ComponentAndName() (string, string) {
- k := strings.Index(m.Target, fileSeparator)
- if k == -1 {
- return m.Target, ""
- }
- return m.Target[:k], m.Target[k+1:]
+ c, n, _ := strings.Cut(m.Target, fileSeparator)
+ return c, n
}
func getStaticDirs(cfg config.Provider) []string {