Merge branch 'master' into screen-share-indicator

This commit is contained in:
Johan Kwarnmark 2020-10-20 14:23:03 +02:00 committed by GitHub
commit e9103aab96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@ jest.mock('fs', () => ({
writeFileSync: jest.fn(),
existsSync: jest.fn(() => true),
unlinkSync: jest.fn(),
readdirSync: jest.fn(() => ['fake1', 'fake2', 'Symphony.config', 'cloudConfig.config']),
readdirSync: jest.fn(() => ['Cache', 'GPUCache', 'Symphony.config', 'cloudConfig.config']),
lstatSync: jest.fn(() => {
return {
isDirectory: jest.fn(() => true),

View File

@ -14,14 +14,13 @@ const cacheCheckFilePath: string = path.join(userDataPath, 'CacheCheck');
* Cleans old cache
*/
const cleanOldCache = (): void => {
const configFilename = 'Symphony.config';
const cloudConfigFilename = 'cloudConfig.config';
const fileRemovalList = ['blob_storage', 'Cache', 'Cookies', 'temp', 'Cookies-journal', 'GPUCache'];
const files = fs.readdirSync(userDataPath);
files.forEach((file) => {
const filePath = path.join(userDataPath, file);
if (file === configFilename || file === cloudConfigFilename) {
if (!fileRemovalList.includes(file)) {
return;
}