1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-08 15:06:08 +02:00

check 'path' for 'empty' as well (#4785)

This commit is contained in:
Scott Bishel 2023-06-20 03:36:13 -06:00 committed by GitHub
parent c4454cac52
commit 343b7bdc4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,8 @@ import (
"github.com/mattermost/mattermost-server/v6/shared/mlog"
)
const emptyString = "empty"
var errEmptyFilename = errors.New("IsFileArchived: empty filename not allowed")
var ErrFileNotFound = errors.New("file not found")
@ -102,7 +104,7 @@ func (a *App) GetFilePath(teamID, rootID, fileName string) (*mm_model.FileInfo,
var filePath string
if fileInfo != nil && fileInfo.Path != "" {
if fileInfo != nil && fileInfo.Path != "" && fileInfo.Path != emptyString {
filePath = fileInfo.Path
} else {
filePath = filepath.Join(teamID, rootID, fileName)