diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-06-03 08:57:19 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-06-03 09:09:36 -0500 |
| commit | c89de5d4bcb56202a6879d752a685a7fc81d2920 (patch) | |
| tree | 2c44b241197cede9ccdb74ca0b3f28dc93f17a8c /src/slskd/Core/Options.cs | |
| parent | 0a30f1080595a877d8c4b30f796e7055302de2cc (diff) | |
| download | slskd-c89de5d4bcb56202a6879d752a685a7fc81d2920.tar.gz | |
temporarily back out destination permissions
Diffstat (limited to 'src/slskd/Core/Options.cs')
| -rw-r--r-- | src/slskd/Core/Options.cs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 4e7dca7b..f2a78247 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1082,43 +1082,6 @@ namespace slskd /// </summary> [Enum(typeof(DestinationExistsStrategy))] public string Exists { get; init; } = DestinationExistsStrategy.Rename.ToString().ToLowerInvariant(); - - /// <summary> - /// Gets the permissions to apply to downloaded files and directories. - /// </summary> - [Validate] - public DestinationPermissionsOptions Permissions { get; init; } = new DestinationPermissionsOptions(); - - /// <summary> - /// Download destination permission options. - /// </summary> - public class DestinationPermissionsOptions : IValidatableObject - { - /// <summary> - /// Gets the permissions to apply to newly created files. - /// </summary> - /// <remarks> - /// Applicable to non-Windows operating systems, only. - /// </remarks> - public string Mode { get; init; } - - public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) - { - var results = new List<ValidationResult>(); - - if (!string.IsNullOrEmpty(Mode)) - { - var regEx = new Regex("^[0-7]{3,4}$", RegexOptions.Compiled); - - if (!regEx.IsMatch(Mode)) - { - results.Add(new ValidationResult($"Field {nameof(Mode)} is invalid. Specify a three- or four-character string consisting of only 0-7 (chmod syntax, [0]000-[7]777, inclusive)")); - } - } - - return results; - } - } } } |
