Double slash during clear cache

Permalink 1 user found helpful
Hi,

I've got a problem. After upload site on a production server, when I wanted to clear cache I've got an error like this:
include(//application/files/cache/overrides/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/f4a918a5b57e1cf0/932cfa5758b63503.php): failed to open stream: No such file or directory


I think that problem is with two slashes on the beginning in include function. How can I resolve this problem? When I removed cache manually (delete all inside cache folder) and clear again via Dashboard, I've got the same error.

Version of c5 is 8.4.4.

IceManSpy
 
IceManSpy replied on at Permalink Best Answer Reply
IceManSpy
I resolved this problem with change
concrete/vendor/tedivm/stash/src/Stash/Driver/FileSystem/NativeEncoder.php

From:
public function deserialize($path)
    {
        if (!file_exists($path)) {
            return false;
        }
        $expiration = null;
        include($path);
        if (!isset($loaded)) {
            return false;
        }
        if (!isset($data)) {
            $data = null;
        }
        return array('data' => $data, 'expiration' => $expiration);
    }


To:
public function deserialize($path)
    {
        if (strpos($path, '//') !== false) {
            $path = str_replace('//',DIRECTORY_SEPARATOR,$path);
        }
        if (!file_exists($path)) {
            return false;
        }
        $expiration = null;
        include($path);
        if (!isset($loaded)) {
            return false;
        }
        if (!isset($data)) {
            $data = null;
JohntheFish replied on at Permalink Reply
JohntheFish
If this resolves a bug, you should add it as a pull request on GitHub.
IceManSpy replied on at Permalink Reply
IceManSpy
In theory, yes, but this issue is in vendor lib. So I can't fix it. I can't see vendor folder in repo.