misc/getfiles: fix infinite recursion loop when given a symlink
This fixes an infinite recursion loop in getFile caused by:
-
os.Stat(file)resolves a symlink so thatfileInfo.isDir()returns True -
filepath.Walk()starts iterating on the root directory (in this case the symlink) -
filepath.Walk()usesos.Lstatinternally, which does NOT dereference the symlink - in the walk func,
f.isDir()returns False, and the walk func callsgetFile()on it - goto 1
fixes #47 (closed)