Prevent symbolic links from themes

This commit is contained in:
Bjørn Erik Pedersen
2018-09-23 17:00:33 +02:00
parent cae07ce84b
commit f916814697
3 changed files with 46 additions and 0 deletions

View File

@@ -218,6 +218,12 @@ func TestRealDirs(t *testing.T) {
checkFileCount(bfs.Resources.Fs, "", assert, 3)
assert.NotNil(bfs.themeFs)
fi, b, err := bfs.themeFs.(afero.Lstater).LstatIfPossible(filepath.Join("resources", "t1.txt"))
assert.NoError(err)
assert.False(b)
assert.Equal("t1.txt", fi.Name())
}
func TestStaticFs(t *testing.T) {