mirror of
https://github.com/bitwarden/android.git
synced 2025-01-12 11:17:30 +03:00
Handle exception when adding attachment that does not exist on file system. (#449)
This commit is contained in:
parent
f0fb401d07
commit
60c5bbc73d
1 changed files with 12 additions and 5 deletions
|
@ -203,6 +203,8 @@ namespace Bit.Android
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
using(var stream = ContentResolver.OpenInputStream(uri))
|
using(var stream = ContentResolver.OpenInputStream(uri))
|
||||||
using(var memoryStream = new MemoryStream())
|
using(var memoryStream = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
@ -211,6 +213,11 @@ namespace Bit.Android
|
||||||
new Tuple<byte[], string>(memoryStream.ToArray(), fileName ?? "unknown_file_name"));
|
new Tuple<byte[], string>(memoryStream.ToArray(), fileName ?? "unknown_file_name"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Java.IO.FileNotFoundException)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ListenYubiKey(bool listen)
|
private void ListenYubiKey(bool listen)
|
||||||
|
|
Loading…
Reference in a new issue