Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adjust this to use $HOME instead of "/home/$user" as well.

  • Loading branch information...
commit fdf7c642e1d967f3fe9844e9c30b76c128f6bf18 1 parent 8033533
@sofar authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 album-watch.php
View
8 album-watch.php
@@ -89,7 +89,9 @@ function do_file($path, $album, $user)
# setup watches
for ($x = 0; $x < count($users); $x++) {
- $d = "/home/" . $users[$x] . "/album";
+ $pw = posix_getpwnam($users[$x]);
+ $home = $pw['dir'];
+ $d = $home . "/album";
if (!is_dir($d))
continue;
@@ -119,7 +121,9 @@ function do_file($path, $album, $user)
# scan for files that need preprocessing and run those first
for ($x = 0; $x < count($users); $x++) {
- $d = "/home/" . $users[$x] . "/album";
+ $pw = posix_getpwnam($users[$x]);
+ $home = $pw['dir'];
+ $d = $home . "/album";
if (!is_dir($d))
continue;
$ah = opendir($d);
Please sign in to comment.
Something went wrong with that request. Please try again.