mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-02-05 14:20:08 +08:00
add check for directory textures
existence
This commit is contained in:
parent
c0e3f48f06
commit
30dd926632
@ -3,7 +3,7 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-01-16 23:01:33
|
||||
* @Last Modified by: prpr
|
||||
* @Last Modified time: 2016-02-03 13:50:17
|
||||
* @Last Modified time: 2016-02-03 15:45:46
|
||||
*
|
||||
* Create tables automatically
|
||||
*/
|
||||
@ -61,6 +61,11 @@ if (!file_exists("./install.lock")) {
|
||||
</pre>
|
||||
";
|
||||
|
||||
if (!is_dir("../textures/")) {
|
||||
echo mkdir("../textures/") ? "Creating textures directory..." :
|
||||
"Creating textures directory failed."
|
||||
}
|
||||
|
||||
echo "Successfully installed. <a href='../index.php'>Index</a>";
|
||||
|
||||
if ($lock = fopen("./install.lock", 'w')) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-02-02 21:59:06
|
||||
* @Last Modified by: prpr
|
||||
* @Last Modified time: 2016-02-03 12:12:16
|
||||
* @Last Modified time: 2016-02-03 15:46:01
|
||||
*/
|
||||
|
||||
class database
|
||||
@ -24,6 +24,10 @@ class database
|
||||
utils::raise(-1, "Looks like that there is no `users` table in your database. ".
|
||||
"Please run `/admin/install.php` first.");
|
||||
}
|
||||
if (!is_dir("./textures/")) {
|
||||
utils::raise(-1, "No `textures` directory exists. Please run `/admin/install.php` ".
|
||||
"or put one manually.");
|
||||
}
|
||||
return $conn;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user