diff --git a/docs/Keepass2Android-Apk.md b/docs/Keepass2Android-Apk.md
index 7286f2b0..080f9498 100644
--- a/docs/Keepass2Android-Apk.md
+++ b/docs/Keepass2Android-Apk.md
@@ -2,7 +2,7 @@ Keepass2Android's apk is pretty big, e.g. when comparing to Keepassdroid. The ma
Here's a list of what is contained in the Keepass2Android 0.9.1 application package:
-{{
+```
Mono for Android
.net dlls 5.0 MB
Runtime 2.5 MB
@@ -22,4 +22,4 @@ Java/Mono bindings 0.5 MB
rest 0.3 MB
TOTAL 13 MB
-}}
\ No newline at end of file
+```
diff --git a/docs/README.md b/docs/README.md
index 7a02a751..1d385bb5 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,3 +1,6 @@
+
Keepass2Android
+
+
# What is Keepass2Android?
Keepass2Android is a password manager app. It allows to store and retrieve passwords and other sensitive information in a file called "database". This database is secured with a so-called master password. The master password typically is a strong password and can be complemented with a second factor for additional security.
The password database file can be synchronized across different devices. This works best using one of the built-in cloud storage options, but can also be performed with third-party apps. Keepass2Android is compatible with Keepass 1 and Keepass 2 on Windows and KeepassX on Linux.
diff --git a/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs b/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs
index 7accb67a..4b291e23 100644
--- a/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs
+++ b/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs
@@ -178,7 +178,9 @@ namespace keepass2android.Io
if (!IsCached(ioc))
throw;
- Kp2aLog.Log("couldn't open from remote " + ioc.Path);
+#if DEBUG
+ Kp2aLog.Log("couldn't open from remote " + ioc.Path);
+#endif
Kp2aLog.Log(ex.ToString());
_cacheSupervisor.CouldntOpenFromRemote(ioc, ex);
diff --git a/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs b/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs
index 0e6870e0..443d5f83 100644
--- a/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs
+++ b/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs
@@ -233,7 +233,6 @@ namespace keepass2android.Io
public FileDescription GetFileDescription(IOConnectionInfo ioc)
{
- Kp2aLog.Log("GetFileDescription "+ioc.Path);
try
{
return ConvertToFileDescription(Jfs.GetFileEntry(IocToPath(ioc)));
@@ -302,7 +301,9 @@ namespace keepass2android.Io
public void OnResume(IFileStorageSetupActivity activity)
{
+#if DEBUG
Kp2aLog.Log("JFS/OnResume Ioc.Path=" +activity.Ioc.Path+". Path="+((IJavaFileStorageFileStorageSetupActivity)activity).Path);
+#endif
_jfs.OnResume(((IJavaFileStorageFileStorageSetupActivity) activity));
}
@@ -366,4 +367,4 @@ namespace keepass2android.Io
}
}
#endif
-}
\ No newline at end of file
+ }
\ No newline at end of file
diff --git a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/PCloudFileStorage.java b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/PCloudFileStorage.java
index ddfeb0e8..5ef0ffb0 100644
--- a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/PCloudFileStorage.java
+++ b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/PCloudFileStorage.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
+import java.util.UUID;
import java.util.regex.Pattern;
import com.pcloud.sdk.ApiClient;
@@ -52,7 +53,7 @@ public class PCloudFileStorage extends JavaFileStorageBase
@Override
public boolean requiresSetup(String path) {
- return true;
+ return !this.isConnected();
}
@Override
@@ -135,8 +136,10 @@ public class PCloudFileStorage extends JavaFileStorageBase
String filePath = path.substring(0, path.lastIndexOf("/") + 1);
RemoteFolder remoteFolder = this.getRemoteFolderByPath(filePath);
+ String tempName = "." + UUID.randomUUID().toString();
try {
- this.apiClient.createFile(remoteFolder, filename, dataSource).execute();
+ RemoteFile remoteFile = this.apiClient.createFile(remoteFolder, tempName, dataSource).execute();
+ this.apiClient.rename(remoteFile, filename).execute();
} catch (ApiError e) {
throw convertApiError(e);
}
@@ -372,7 +375,7 @@ public class PCloudFileStorage extends JavaFileStorageBase
private Exception convertApiError(ApiError e) {
String strErrorCode = String.valueOf(e.errorCode());
- if (strErrorCode.startsWith("1") || "2000".equals(strErrorCode)) {
+ if (strErrorCode.startsWith("1") || "2000".equals(strErrorCode) || "2095".equals(strErrorCode)) {
this.clearAuthToken();
return new UserInteractionRequiredException("Unlinked from PCloud! User must re-link.", e);
} else if (strErrorCode.startsWith("2")) {
diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml
index 08b39494..b9b2fe9a 100644
--- a/src/keepass2android/Resources/values/strings.xml
+++ b/src/keepass2android/Resources/values/strings.xml
@@ -515,8 +515,8 @@
Enter OwnCloud login data:
OwnCloud URL (ex: owncloud.me.com)
- Enter NextCloud login data:
- NextCloud URL (ex: nextcloud.me.com)
+ Enter Nextcloud login data:
+ Nextcloud URL (ex: nextcloud.me.com)
host (ex: 192.168.0.1)
port
@@ -538,7 +538,7 @@
HTTP (WebDav)
HTTPS (WebDav)
OwnCloud
- NextCloud
+ Nextcloud
Dropbox
Dropbox (KP2A folder)
If you do not want to give KP2A access to your full Dropbox, you may select this option. It will request only access to the folder Apps/Keepass2Android. This is especially suited when creating a new database. If you already have a database, click this option to create the folder, then place your file inside the folder (from your PC) and then select this option again for opening the file.
diff --git a/src/keepass2android/fileselect/FileStorageSetupActivity.cs b/src/keepass2android/fileselect/FileStorageSetupActivity.cs
index 85a45bd6..ee180f66 100644
--- a/src/keepass2android/fileselect/FileStorageSetupActivity.cs
+++ b/src/keepass2android/fileselect/FileStorageSetupActivity.cs
@@ -44,7 +44,7 @@ namespace keepass2android.fileselect
Ioc = new IOConnectionInfo();
Util.SetIoConnectionFromIntent(Ioc, Intent);
- Kp2aLog.Log("FSSA.OnCreate with " + Ioc.Path);
+ Kp2aLog.Log("FSSA.OnCreate");
ProcessName = Intent.GetStringExtra(FileStorageSetupDefs.ExtraProcessName);
IsForSave = Intent.GetBooleanExtra(FileStorageSetupDefs.ExtraIsForSave, false);
diff --git a/src/keepass2android/fileselect/FileStorageSetupInitiatorActivity.cs b/src/keepass2android/fileselect/FileStorageSetupInitiatorActivity.cs
index 4b158535..ef08fe73 100644
--- a/src/keepass2android/fileselect/FileStorageSetupInitiatorActivity.cs
+++ b/src/keepass2android/fileselect/FileStorageSetupInitiatorActivity.cs
@@ -32,7 +32,7 @@ namespace keepass2android
public void StartSelectFileProcess(IOConnectionInfo ioc, bool isForSave, int requestCode)
{
- Kp2aLog.Log("FSSIA: StartSelectFileProcess "+ioc.Path);
+ Kp2aLog.Log("FSSIA: StartSelectFileProcess ");
Intent fileStorageSetupIntent = new Intent(_activity, typeof(FileStorageSetupActivity));
fileStorageSetupIntent.PutExtra(FileStorageSetupDefs.ExtraProcessName, FileStorageSetupDefs.ProcessNameSelectfile);
fileStorageSetupIntent.PutExtra(FileStorageSetupDefs.ExtraIsForSave, isForSave);