mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] Call string.Equals instead of string.Compare.
This commit is contained in:
@@ -51,11 +51,12 @@ 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(string.Equals(xattr, "com.caldera.cpm.password", StringComparison.InvariantCulture))
|
||||
{
|
||||
if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf)) return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
if(string.Compare(xattr, "com.caldera.cpm.password.text", StringComparison.InvariantCulture) != 0)
|
||||
if(!string.Equals(xattr, "com.caldera.cpm.password.text", StringComparison.InvariantCulture))
|
||||
return ErrorNumber.NoSuchExtendedAttribute;
|
||||
|
||||
return !_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf)
|
||||
|
||||
Reference in New Issue
Block a user