Skip to content

Commit

Permalink
Only open .nsbak extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
apsun committed Feb 28, 2018
1 parent 1c12543 commit 2419dc9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/com/crossbowffs/nekosms/backup/BackupLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.crossbowffs.nekosms.utils.Xlog;

import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
Expand Down Expand Up @@ -48,15 +49,12 @@ public static String getDefaultBackupFileName() {

public static File[] enumerateBackupFiles() {
File backupDir = getBackupDirectory();

// In the future we will only accept backup files with the
// correct extension.
File[] fileList = backupDir.listFiles(/* new FilenameFilter() {
File[] fileList = backupDir.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.endsWith(BACKUP_FILE_EXTENSION);
}
} */);
});

if (fileList != null) {
// Currently file names are sorted purely lexicographically,
Expand Down

0 comments on commit 2419dc9

Please sign in to comment.