Skip to content

Commit

Permalink
Fix issue when builds dir is a symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
dregad committed Mar 11, 2014
1 parent d9a5011 commit ef8b2a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builds.php
Expand Up @@ -221,7 +221,7 @@ function print_builds_list( $p_builds ) {
$t_path_root = rtrim( $_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR;
$t_path = realpath( $t_path_root . $t_dir );
if( false === $t_path ) {
$t_path = realpath( $t_path_root . '..' . DIRECTORY_SEPARATOR . $t_dir );
$t_path = realpath( dirname( $t_path_root ) . DIRECTORY_SEPARATOR . $t_dir );
}
if( false === $t_path ) {
$t_path = $t_dir;
Expand Down
2 changes: 1 addition & 1 deletion irclogs.php
Expand Up @@ -189,7 +189,7 @@ function( &$p_elem, $p_key ) use ( $t_fmt_year ) {
$t_path_root = rtrim( $_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR;
$t_path = realpath( $t_path_root . $t_dir );
if( false === $t_path ) {
$t_path = realpath( $t_path_root . '..' . DIRECTORY_SEPARATOR . $t_dir );
$t_path = realpath( dirname( $t_path_root ) . DIRECTORY_SEPARATOR . $t_dir );
}
if( false === $t_path ) {
$t_path = $t_dir;
Expand Down

0 comments on commit ef8b2a6

Please sign in to comment.