Backend: Index symlinks as folders

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-07-17 10:10:33 +02:00
parent 13fe9af2fc
commit ac0ce0aaf0

View File

@ -121,7 +121,7 @@ func (ind *Index) Start(opt IndexOptions) map[string]bool {
isSymlink := info.IsSymlink()
if skip, result := fs.SkipWalk(fileName, isDir, isSymlink, done, ignore); skip {
if isDir && result != filepath.SkipDir {
if (isSymlink || isDir) && result != filepath.SkipDir {
folder := entity.NewFolder(entity.RootOriginals, fs.RelName(fileName, originalsPath), nil)
if err := folder.Create(); err == nil {