Fix for paths without /\ and with white spaces.

This commit is contained in:
Raimund58
2020-12-29 15:11:22 +00:00
committed by Sheepit Renderfarm
parent 4c3b5c0188
commit bdb78b461f

View File

@@ -142,7 +142,7 @@ public class Worker {
}
if (cache_dir != null) {
Pattern cache_dirValidator = Pattern.compile("^(\\/|\\\\|[a-z]:)[a-z0-9\\/\\\\-_.]+$",Pattern.CASE_INSENSITIVE);
Pattern cache_dirValidator = Pattern.compile("^(\\/|\\\\|[a-z]:)?[a-z0-9\\/\\\\\\s-_.]+$",Pattern.CASE_INSENSITIVE);
Matcher cache_dirCandidate = cache_dirValidator.matcher(cache_dir);
if (cache_dirCandidate.find()) {