Fix check for shared files inside shares