diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2020-10-10 13:07:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-10 13:07:57 +0800 |
| commit | 411e49f96494629fa3da334e8dc7cc15bd4d19cd (patch) | |
| tree | 1756f0a2f86c871a6db67df7ecbd509c9df32233 /weed/util/fullpath.go | |
| parent | ac162fc85769cb1b2a1f8694f9644eae7d0ce6c8 (diff) | |
| parent | 4a15e9c830de1b654515308e5be8380ffa34aefa (diff) | |
| download | seaweedfs-411e49f96494629fa3da334e8dc7cc15bd4d19cd.tar.xz seaweedfs-411e49f96494629fa3da334e8dc7cc15bd4d19cd.zip | |
Merge pull request #23 from chrislusf/master
sync
Diffstat (limited to 'weed/util/fullpath.go')
| -rw-r--r-- | weed/util/fullpath.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/util/fullpath.go b/weed/util/fullpath.go index 4ce8a2f90..f2119707e 100644 --- a/weed/util/fullpath.go +++ b/weed/util/fullpath.go @@ -13,6 +13,7 @@ func NewFullPath(dir, name string) FullPath { func (fp FullPath) DirAndName() (string, string) { dir, name := filepath.Split(string(fp)) + name = strings.ToValidUTF8(name, "?") if dir == "/" { return dir, name } @@ -24,6 +25,7 @@ func (fp FullPath) DirAndName() (string, string) { func (fp FullPath) Name() string { _, name := filepath.Split(string(fp)) + name = strings.ToValidUTF8(name, "?") return name } |
