aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2022-05-14 20:46:29 -0500
committerJP Dillingham <jpdillingham@gmail.com>2022-05-14 20:46:29 -0500
commit7caa8e13b7dfefa76dee92897f459514f2983e6b (patch)
tree09532fbf8eee734c5752726481a9dc55f1fa2af2
parent2315ccac2306caff3942916326d1569886cfa4e8 (diff)
downloadslskd-7caa8e13b7dfefa76dee92897f459514f2983e6b.tar.gz
account for exclusions when validating shares
-rw-r--r--src/slskd/Options.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/slskd/Options.cs b/src/slskd/Options.cs
index a1493ca4..a8c3380c 100644
--- a/src/slskd/Options.cs
+++ b/src/slskd/Options.cs
@@ -342,7 +342,7 @@ namespace slskd
bool IsRoot((string Raw, string Mask, string Alias, string Path) share) => share.Path == "/" || share.Path == "\\" || Path.GetPathRoot(share.Path) == share.Path;
// starts with '/', 'X:\', or '\\'
- bool IsAbsolutePath(string share) => Regex.IsMatch(share.ToLocalOSPath(), @"^(\[.*\])?(\/|[a-zA-Z]:\\|\\\\).*$");
+ bool IsAbsolutePath(string share) => Regex.IsMatch(share.ToLocalOSPath(), @"^(!|-){0,1}(\[.*\])?(\/|[a-zA-Z]:\\|\\\\).*$");
var relativePaths = Shared.Where(share => !IsAbsolutePath(share));
foreach (var relativePath in relativePaths)