aboutsummaryrefslogtreecommitdiff
path: root/weed/util/fullpath.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-07 00:55:34 -0700
committerchrislu <chris.lu@gmail.com>2022-08-07 00:55:34 -0700
commit0e9478488dcf0773662b1469e946b3cad9fd21f9 (patch)
treed1781cf898a1cf0d63f2c0db9e62d71e9ef347e4 /weed/util/fullpath.go
parent8a880a139d81b3c0ee14d0f22a2f569abb1a48b6 (diff)
downloadseaweedfs-0e9478488dcf0773662b1469e946b3cad9fd21f9.tar.xz
seaweedfs-0e9478488dcf0773662b1469e946b3cad9fd21f9.zip
filer.sync: fix when excluded paths is empty
Diffstat (limited to 'weed/util/fullpath.go')
-rw-r--r--weed/util/fullpath.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/util/fullpath.go b/weed/util/fullpath.go
index f52d4d1d0..92580dc38 100644
--- a/weed/util/fullpath.go
+++ b/weed/util/fullpath.go
@@ -63,3 +63,9 @@ func Join(names ...string) string {
func JoinPath(names ...string) FullPath {
return FullPath(Join(names...))
}
+func Split(separatedValues string, sep string) []string {
+ if separatedValues == "" {
+ return nil
+ }
+ return strings.Split(separatedValues, sep)
+}