added CreateFilePath method to IFileStorage and used it after file chooser for save
-> save as works with GDrive as well minor changes and fixes
This commit is contained in:
@@ -200,5 +200,12 @@ namespace keepass2android.Io
|
||||
{
|
||||
return ioc.GetDisplayName();
|
||||
}
|
||||
|
||||
public string CreateFilePath(string parent, string newFilename)
|
||||
{
|
||||
if (!parent.EndsWith("/"))
|
||||
parent += "/";
|
||||
return parent + newFilename;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -481,6 +481,11 @@ namespace keepass2android.Io
|
||||
return _cachedStorage.GetDisplayName(ioc);
|
||||
}
|
||||
|
||||
public string CreateFilePath(string parent, string newFilename)
|
||||
{
|
||||
return _cachedStorage.CreateFilePath(parent, newFilename);
|
||||
}
|
||||
|
||||
|
||||
public string GetBaseVersionHash(IOConnectionInfo ioc)
|
||||
{
|
||||
|
||||
@@ -150,6 +150,10 @@ namespace keepass2android.Io
|
||||
/// Converts the given path to a displayable string
|
||||
/// </summary>
|
||||
string GetDisplayName(IOConnectionInfo ioc);
|
||||
|
||||
//returns the path of a file "newFilename" in the folder "parent"
|
||||
//this may create the file if this is required to get a path (if a UUID is part of the file path)
|
||||
string CreateFilePath(string parent, string newFilename);
|
||||
}
|
||||
|
||||
public interface IWriteTransaction: IDisposable
|
||||
|
||||
@@ -280,6 +280,11 @@ namespace keepass2android.Io
|
||||
return _jfs.GetDisplayName(ioc.Path);
|
||||
}
|
||||
|
||||
public string CreateFilePath(string parent, string newFilename)
|
||||
{
|
||||
return _jfs.CreateFilePath(parent, newFilename);
|
||||
}
|
||||
|
||||
private DateTime JavaTimeToCSharp(long javatime)
|
||||
{
|
||||
return new DateTime(1970, 1, 1).AddMilliseconds(javatime);
|
||||
|
||||
Reference in New Issue
Block a user