forked from SimpleMachines/SMF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handles symlinks when checking paths of $boarddir, $sourcedir, etc.
We can't just use `!is_dir()` in case there's a symlink, but we neither can we use `is_file()` in case the directory doesn't exist at all, nor can we use `file_exists()` in case it does exist but it is not a directory. So, this uses `!is_dir(realpath($whatever))` to resolve any symlinks or other weirdness in the path and then checks if the resolved path is in fact a directory. Signed-off-by: Jon Stovell <[email protected]>
- Loading branch information
1 parent
0b6bcb3
commit 022bec5
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters