Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions class/class-wp-scss.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function compile() {
private function compiler($in, $out) {

if (!file_exists($this->cache)) {
mkdir($this->cache, 0644);
wp_mkdir_p($this->cache);
}
if (is_writable($this->cache)) {
try {
Expand All @@ -176,9 +176,12 @@ private function compiler($in, $out) {
array_push($this->compile_errors, $errors);
}
} else {
$message = !file_exists($this->cache)
? "File Permission Error, unable to create the cache directory. Please manually create: " . $this->cache
: "File Permission Error, permission denied. Please make the cache directory writable.";
$errors = array (
'file' => $this->cache,
'message' => "File Permission Error, permission denied. Please make the cache directory writable."
'message' => $message
);
array_push($this->compile_errors, $errors);
}
Expand Down