Instead of setting the directory empty so it's initialized to the root, use a variable which can be set when there are problems expanding the path. This is then checked once at the end. Also avoid inlining platform specific root directory access.
Instead of setting the directory empty so it's initialized to the root, use a variable which can be set when there are problems expanding the path. This is then checked once at the end. Also avoid inlining platform specific root directory access.