mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Lib fully migrated to Standard
CryptographicEngine.DeriveKeyMaterial exception...
This commit is contained in:
@@ -32,6 +32,7 @@ using Windows.Storage;
|
||||
|
||||
using ModernKeePassLibPCL.Interfaces;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModernKeePassLibPCL.Serialization
|
||||
{
|
||||
@@ -306,12 +307,15 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
|
||||
public StorageFile StorageFile { get; set; }
|
||||
|
||||
public bool CanProbablyAccess()
|
||||
public async Task<bool> CanProbablyAccess()
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
if(IsLocalFile())
|
||||
//return (FileSystem.Current.GetFileFromPathAsync(m_strUrl).Result != null);
|
||||
return StorageFile.GetFileFromPathAsync(m_strUrl).GetResults() != null;
|
||||
if (IsLocalFile())
|
||||
{
|
||||
//return (FileSystem.Current.GetFileFromPathAsync(m_strUrl).Result != null);
|
||||
var file = await StorageFile.GetFileFromPathAsync(m_strUrl);
|
||||
return file != null;
|
||||
}
|
||||
#else
|
||||
if(IsLocalFile()) return File.Exists(m_strUrl);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user