From bdb78b461f766c2029e97943686dca4e3b5835d8 Mon Sep 17 00:00:00 2001 From: Raimund58 Date: Tue, 29 Dec 2020 15:11:22 +0000 Subject: [PATCH] Fix for paths without /\ and with white spaces. --- src/com/sheepit/client/standalone/Worker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/sheepit/client/standalone/Worker.java b/src/com/sheepit/client/standalone/Worker.java index 2069068..fd3baad 100644 --- a/src/com/sheepit/client/standalone/Worker.java +++ b/src/com/sheepit/client/standalone/Worker.java @@ -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()) {