Handle shared directories

When using shared folders, the code didn't work, you need to use another key. Thoses changes make shared folders and shared files works.