Skip to content

Commit

Permalink
fix(profile): filter out the useless logs & crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Sep 14, 2019
1 parent d50343d commit fa2c590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/store/modules/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ const mod = {
},
async listLogs(context) {
const files = await context.dispatch('readFolder', `profiles/${context.state.id}/logs`);
return files.filter(f => f !== '.DS_Store');
return files.filter(f => f !== '.DS_Store' && f.endsWith('.gz') || f.endsWith('.txt'));
},
async removeLog(context, name) {
const filePath = context.rootGetters.path('profiles', context.state.id, 'logs', name);
Expand All @@ -764,7 +764,7 @@ const mod = {
},
async listCrashReports(context) {
const files = await context.dispatch('readFolder', `profiles/${context.state.id}/crash-reports`);
return files.filter(f => f !== '.DS_Store');
return files.filter(f => f !== '.DS_Store' && f.endsWith('.gz') || f.endsWith('.txt'));
},
async removeCrashReport(context, name) {
const filePath = context.rootGetters.path('profiles', context.state.id, 'crash-reports', name);
Expand Down

0 comments on commit fa2c590

Please sign in to comment.