mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #10548 from StevenTobin/follow_symlinks
Make file_reader follow symlinks
This commit is contained in:
commit
d6667c4fa0
@ -151,6 +151,17 @@ func createWalkFn(fr *fileReader, folderId int64) filepath.WalkFunc {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkFilepath, err := filepath.EvalSymlinks(path)
|
||||||
|
|
||||||
|
if path != checkFilepath {
|
||||||
|
path = checkFilepath
|
||||||
|
fi, err := os.Lstat(checkFilepath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
fileInfo = fi
|
||||||
|
}
|
||||||
|
|
||||||
cachedDashboard, exist := fr.cache.getCache(path)
|
cachedDashboard, exist := fr.cache.getCache(path)
|
||||||
if exist && cachedDashboard.UpdatedAt == fileInfo.ModTime() {
|
if exist && cachedDashboard.UpdatedAt == fileInfo.ModTime() {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user