Skip to content

Wrong path of $cache_dir variable #266

Description

@dawidt147

I noticed today that plugin rebuilds css in wrong directory.
I looked at the class-wp-scss.php file and it looks like $cache_dir in the constructor of the class doesn't have "/" at the end. In this scenario rebuilt files are now located in my /themes/ dir instead of /themes/theme/css.

I've added temporary solution:

  public function __construct ($scss_dir, $css_dir, $cache_dir, $compile_method, $sourcemaps) {
// New code
    if (substr($cache_dir,  -1) !== '/') {
        $cache_dir .= '/';
    }
// end

    $this->scss_dir         = $scss_dir;
    $this->css_dir          = $css_dir;
    $this->cache            = $cache_dir;
    $this->compile_errors   = array();
    $this->scssc            = new Compiler();

to force "/" at the end and now every thing compiles as intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions