diff options
| author | ustuzhanin <55892859+ustuzhanin@users.noreply.github.com> | 2020-10-02 22:47:25 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-02 22:47:25 +0500 |
| commit | 3e0a79ef050dba9e5347d20537ef562cc4b30b62 (patch) | |
| tree | e0b42e531d18136d9e272258187a305690ee2b4d /weed/util/fullpath.go | |
| parent | cbd80253e33688f55c02dd29c994a3ee6eac3d6c (diff) | |
| parent | 9ab98fa912814686b3035a97b5173c1628fbc0fc (diff) | |
| download | seaweedfs-3e0a79ef050dba9e5347d20537ef562cc4b30b62.tar.xz seaweedfs-3e0a79ef050dba9e5347d20537ef562cc4b30b62.zip | |
Merge pull request #1 from chrislusf/master
Merge upstream
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 } |
