fixed bug and improved code for file/subdir share in repo/file_view