amekkawi / diskusagereports

Disk Usage Reports is a web-based way to view disk usage on remote computers or servers, or to provide usage reports to users who store files on your server. Reports are stored as static JSON files which are retrieved via single HTML/AJAX web UI. No database or server-side scripting required.
http://diskusagereports.com
MIT License
67 stars 19 forks source link

Fix handling of symlinks causing directory tree recursion to break #11

Open winstona opened 6 years ago

winstona commented 6 years ago

This should fix issue: #8

symlinks are stored in the data file as:

l 2017-09-24 18:41:05 30 <srcdir>/extlinux.conf -> ../boot/extlinux/extlinux.conf

the destination -> ../boot/extlinux/extlinux.conf breaks traversal of the directory tree, causing subdirectory placement to put directories in the wrong location.

This fix strips out the destination leaving just the symlink filename