]> git.mxchange.org Git - friendica.git/blobdiff - src/Contact/Avatar.php
Merge pull request #12397 from HankG/fix-photo-get-without-scale-arg
[friendica.git] / src / Contact / Avatar.php
index d4368df22baac8771656342f495c83e7cddc5add..0cfc8df3458275478b84340d9245440c595af10c 100644 (file)
@@ -161,7 +161,7 @@ class Avatar
                        $dirpath .= $part . '/';
 
                        if (!file_exists($dirpath)) {
-                               if (!@mkdir($dirpath, $dir_perm)) {
+                               if (!@mkdir($dirpath, $dir_perm) && !file_exists($dirpath)) {
                                        Logger::warning('Directory could not be created', ['directory' => $dirpath]);
                                }
                        } elseif ((($old_perm = fileperms($dirpath) & 0777) != $dir_perm) && !chmod($dirpath, $dir_perm)) {