projects
/
phpfspot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81e72e0
)
check if photo exists and is readable in gen_thumb() function also
author
Andreas Unterkircher
<unki@netshadow.at>
Sat, 30 Jun 2007 10:32:25 +0000
(10:32 +0000)
committer
Andreas Unterkircher
<unki@netshadow.at>
Sat, 30 Jun 2007 10:32:25 +0000
(10:32 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@148
fa6a889d
-dae6-447d-9e79-
4ba9a3039384
phpfspot.class.php
patch
|
blob
|
history
diff --git
a/phpfspot.class.php
b/phpfspot.class.php
index 7084ce108e1ee59e6a128234e79e1b82b325a88f..36662fd27373e7276993963f20f0f02c6b4030d5 100644
(file)
--- a/
phpfspot.class.php
+++ b/
phpfspot.class.php
@@
-654,6
+654,17
@@
class PHPFSPOT {
/* calculate file MD5 sum */
$full_path = $this->translate_path($details['directory_path']) ."/". $details['name'];
+
+ if(!file_exists($full_path)) {
+ print "File ". $full_path ." does not exist\n";
+ return;
+ }
+
+ if(!is_readable($full_path)) {
+ print "File ". $full_path ." is not readable for ". get_current_user() ."\n";
+ return;
+ }
+
$file_md5 = md5_file($full_path);
$this->_debug("Image [". $idx ."] ". $details['name'] ." Thumbnails:");