Skip to content

Commit

Permalink
fix zero level
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Mar 5, 2018
1 parent 3d8700e commit 31d8fb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ private function getLevelFolders($is_cache = false, $ds = null)
$dir3 = ceil($this->id / 1000000) * 1000000;

$url = $ds;

if($level === 1)
$url .= $dir1 . $ds;
elseif($level === 2)
$url .= $dir2 . $ds . $dir1 . $ds;
else
elseif($level === 3)
$url .= $dir3 . $ds . $dir2 . $ds . $dir1 . $ds;

return $url;
}

Expand Down

0 comments on commit 31d8fb3

Please sign in to comment.