mirror of
https://github.com/openvk/openvk
synced 2025-01-03 22:31:59 +03:00
Add auto-resolution for weird directory files error in Photo
This commit is contained in:
parent
599c378b6f
commit
15385ad69d
1 changed files with 3 additions and 1 deletions
|
@ -57,8 +57,10 @@ class Photo extends Media
|
||||||
{
|
{
|
||||||
$dir = dirname($this->pathFromHash($hash));
|
$dir = dirname($this->pathFromHash($hash));
|
||||||
$dir = "$dir/$hash" . "_cropped";
|
$dir = "$dir/$hash" . "_cropped";
|
||||||
if(!is_dir($dir))
|
if(!is_dir($dir)) {
|
||||||
|
@unlink($dir); # Added to transparently bypass issues with dead pesudofolders summoned by buggy SWIFT impls (selectel)
|
||||||
mkdir($dir);
|
mkdir($dir);
|
||||||
|
}
|
||||||
|
|
||||||
$sizes = simplexml_load_file(OPENVK_ROOT . "/data/photosizes.xml");
|
$sizes = simplexml_load_file(OPENVK_ROOT . "/data/photosizes.xml");
|
||||||
if(!$sizes)
|
if(!$sizes)
|
||||||
|
|
Loading…
Reference in a new issue