ca-x / vivaldi_plus

根据shuax chrome_plus 修改

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用 ini 自定义 Cache 问题

Bush2021 opened this issue · comments

首先偏个题,Chrome 路径中的斜杠是 "",所以你的默认配置文件应该改成:
[dir_setting]
data=%app%\..\Data
cache=%app%\..\Cache

进入正题啊,对于 Cache 回退目录,比如 cache=%app%\..\Cache,会导致清理浏览器缓存出错,表现为无限计算缓存大小,这个问题在 GreenChrome 中也存在;
这个问题只会在回退到上一目录时存在,如果设置为 cache=%app%\Cache 则不会有任何问题,一个可能的解决方法是在拼入命令行的时候转化为绝对路径,就像 Chrome++ 原版那样。

try

std::wstring GetAbsolutePath(const std::wstring &path)
{
    wchar_t buffer[MAX_PATH];
    ::GetFullPathNameW(path.c_str(), MAX_PATH, buffer, NULL);
    return buffer;
}

测试通过
image

这部分代码我已经合并到主分支了 @Bush2021