dever 6 years ago
parent
commit
4815038971
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Store/Core.php

+ 1 - 1
lib/Store/Core.php

@@ -245,10 +245,10 @@ class Core
 						$this->data['name'] = $this->data['file']['name'];
 					} else {
 						$filename = md5($this->data['pic']) . '.' . pathinfo($this->data['pic'], PATHINFO_EXTENSION);
+						$this->path();
 						$file = $this->base . $this->data['key'] . $this->path . $filename;
 						if (!is_file($file)) {
 							$content = Dever::curl($name);
-							$this->path();
 							file_put_contents($file, $content);
 						}