Ignore hidden files in the /regions directory (like .DS_Store)

This commit is contained in:
Thijs Wiefferink 2018-05-29 22:58:15 +02:00
parent 5aceb81cfd
commit 6b9866a4c4
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ public class ImportJob {
// Import regions from each world
for(File worldFolder : worldFolders) {
// Skip files
if(!worldFolder.isDirectory()) {
if(!worldFolder.isDirectory() || worldFolder.isHidden()) {
continue;
}

View File

@ -955,7 +955,7 @@ public class FileManager extends Manager {
List<GeneralRegion> noRegion = new ArrayList<>();
List<GeneralRegion> incorrectDuration = new ArrayList<>();
for(File regionFile : regionFiles) {
if(regionFile.exists() && regionFile.isFile()) {
if(regionFile.exists() && regionFile.isFile() && !regionFile.isHidden()) {
// Load the region file from disk in UTF8 mode
YamlConfiguration config;