forked from Qortal/qortal
Combined path filtering into a single filter to avoid iterating through the list multiple times.
This commit is contained in:
parent
0a2b4dedc7
commit
a87fe8b44d
@ -235,9 +235,9 @@ public class ArbitraryDataStorageManager extends Thread {
|
|||||||
// Also exclude the _temp and _misc paths if present
|
// Also exclude the _temp and _misc paths if present
|
||||||
List<Path> allPaths = Files.walk(dataPath, 3)
|
List<Path> allPaths = Files.walk(dataPath, 3)
|
||||||
.filter(Files::isDirectory)
|
.filter(Files::isDirectory)
|
||||||
.filter(path -> !path.toAbsolutePath().toString().contains(tempPath.toAbsolutePath().toString()))
|
.filter(path -> !path.toAbsolutePath().toString().contains(tempPath.toAbsolutePath().toString())
|
||||||
.filter(path -> !path.toString().contains("_misc"))
|
&& !path.toString().contains("_misc")
|
||||||
.filter(path -> path.getFileName().toString().length() > 32)
|
&& path.getFileName().toString().length() > 32)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
// Loop through each path and attempt to match it to a signature
|
// Loop through each path and attempt to match it to a signature
|
||||||
|
Loading…
x
Reference in New Issue
Block a user