Skip to content

Commit

Permalink
fix: hide crowsnest backups when "Hide backup files" is enabled (#1824)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Mar 19, 2024
1 parent 972266d commit 0f060d9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/panels/Machine/ConfigFilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,15 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin, ThemeMixin) {
}
if (this.hideBackupFiles) {
const backupFileMatcher = /.*\/?printer-\d{8}_\d{6}\.cfg$/
files = files.filter((file) => !file.filename.match(backupFileMatcher) && !file.filename.endsWith('.bkp'))
const klipperBackupFileMatcher = /^printer-\d{8}_\d{6}\.cfg$/
const crowsnestBackupFileMatcher = /^crowsnest\.conf\.\d{4}-\d{2}-\d{2}-\d{4}$/
files = files.filter(
(file) =>
!file.filename.match(klipperBackupFileMatcher) &&
!file.filename.match(crowsnestBackupFileMatcher) &&
!file.filename.endsWith('.bkp')
)
}
return files
Expand Down

0 comments on commit 0f060d9

Please sign in to comment.