fixed problems with OTP, completed implementation to work with cloud storage

This commit is contained in:
Philipp Crocoll
2013-11-22 21:47:13 +01:00
parent aeaba47573
commit 3fde2c9846
12 changed files with 4849 additions and 2013 deletions

View File

@@ -275,6 +275,27 @@ namespace keepass2android.Io
return _jfs.CreateFilePath(parent, newFilename);
}
public IOConnectionInfo GetParentPath(IOConnectionInfo ioc)
{
return IoUtil.GetParentPath(ioc);
}
public IOConnectionInfo GetFilePath(IOConnectionInfo folderPath, string filename)
{
try
{
return IOConnectionInfo.FromPath(
ListContents(folderPath).Where(desc => { return desc.DisplayName == filename; })
.Single()
.Path);
}
catch (Exception e)
{
throw new Exception("Error finding " + filename + " in " + folderPath.GetDisplayName(), e);
}
}
private DateTime JavaTimeToCSharp(long javatime)
{
return new DateTime(1970, 1, 1).AddMilliseconds(javatime);