mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] Use collection expressions.
This commit is contained in:
@@ -56,9 +56,8 @@ public sealed partial class CPM
|
||||
if(!_fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return ErrorNumber.NoSuchFile;
|
||||
|
||||
if(string.Compare(xattr, "com.caldera.cpm.password", StringComparison.InvariantCulture) == 0)
|
||||
{
|
||||
if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf)) return ErrorNumber.NoError;
|
||||
}
|
||||
if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf))
|
||||
return ErrorNumber.NoError;
|
||||
|
||||
if(string.Compare(xattr, "com.caldera.cpm.password.text", StringComparison.InvariantCulture) != 0)
|
||||
return ErrorNumber.NoSuchExtendedAttribute;
|
||||
@@ -85,7 +84,7 @@ public sealed partial class CPM
|
||||
|
||||
if(!_fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return ErrorNumber.NoSuchFile;
|
||||
|
||||
xattrs = new List<string>();
|
||||
xattrs = [];
|
||||
|
||||
if(_passwordCache.ContainsKey(pathElements[0].ToUpperInvariant())) xattrs.Add("com.caldera.cpm.password");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user