mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-22 11:52:38 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into master-MC1.7.10
This commit is contained in:
commit
8785bb4a8f
@ -120,11 +120,14 @@ object SaveHandler {
|
||||
}
|
||||
|
||||
// Delete empty folders that match a drive UUID to keep the state folder clean.
|
||||
savePath.listFiles(new FileFilter {
|
||||
val emptyDirs = savePath.listFiles(new FileFilter {
|
||||
override def accept(file: File) = file.getName.matches(uuidRegex) && file.isDirectory && {
|
||||
val list = file.list()
|
||||
list == null || list.length == 0
|
||||
}
|
||||
}).foreach(_.delete())
|
||||
})
|
||||
if (emptyDirs != null) {
|
||||
emptyDirs.filter(_ != null).foreach(_.delete())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user