diff --git a/src/KeePassLib2Android/Serialization/FileLock.cs b/src/KeePassLib2Android/Serialization/FileLock.cs index 6a0437f8..9f08fa3f 100644 --- a/src/KeePassLib2Android/Serialization/FileLock.cs +++ b/src/KeePassLib2Android/Serialization/FileLock.cs @@ -185,7 +185,7 @@ namespace KeePassLib.Serialization byte[] pbFile = StrUtil.Utf8.GetBytes(sb.ToString()); s = IOConnection.OpenWrite(iocLockFile); - if(s == null) throw new IOException(iocLockFile.GetDisplayName()); + if(s == null) throw new IOException(UrlUtil.GetFileName(iocLockFile.Path)); s.Write(pbFile, 0, pbFile.Length); } finally { if(s != null) s.Close(); } @@ -205,7 +205,7 @@ namespace KeePassLib.Serialization if(lfiEx != null) { m_iocLockFile = null; // Otherwise Dispose deletes the existing one - throw new FileLockException(iocBaseFile.GetDisplayName(), + throw new FileLockException(UrlUtil.GetFileName(iocBaseFile.Path), lfiEx.GetOwner()); } diff --git a/src/KeePassLib2Android/Utility/MessageService.cs b/src/KeePassLib2Android/Utility/MessageService.cs index 4654fe70..fd9cd033 100644 --- a/src/KeePassLib2Android/Utility/MessageService.cs +++ b/src/KeePassLib2Android/Utility/MessageService.cs @@ -28,6 +28,7 @@ using System.Diagnostics; using KeePassLib.Resources; using KeePassLib.Serialization; +using Android.Webkit; namespace KeePassLib.Utility { @@ -411,7 +412,7 @@ Clipboard.SetText(ObjectsToMessage(vLines, true));*/ public static void ShowLoadWarning(IOConnectionInfo ioConnection, Exception ex) { if (ioConnection != null) - ShowLoadWarning(ioConnection.GetDisplayName(), ex, false); + ShowLoadWarning(UrlUtil.GetFileName(ioConnection.Path), ex, false); else ShowWarning(ex); } @@ -444,7 +445,7 @@ Clipboard.SetText(ObjectsToMessage(vLines, true));*/ bool bCorruptionWarning) { if (ioConnection != null) - ShowSaveWarning(ioConnection.GetDisplayName(), ex, bCorruptionWarning); + ShowSaveWarning(UrlUtil.GetFileName(ioConnection.Path), ex, bCorruptionWarning); else ShowWarning(ex); } diff --git a/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs b/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs index 321d83bd..0d8e5e27 100644 --- a/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs +++ b/src/Kp2aBusinessLogic/Io/CachingFileStorage.cs @@ -124,7 +124,7 @@ namespace keepass2android.Io && File.Exists(VersionFilePath(ioc)) && File.Exists(BaseVersionFilePath(ioc)); - Kp2aLog.Log(ioc.GetDisplayName() + " isCached = " + result); + Kp2aLog.Log(GetDisplayName(ioc) + " isCached = " + result); return result; } @@ -598,13 +598,14 @@ namespace keepass2android.Io public string GetBaseVersionHash(IOConnectionInfo ioc) { string hash = File.ReadAllText(BaseVersionFilePath(ioc)); - Kp2aLog.Log(ioc.GetDisplayName() + " baseVersionHash = " + hash); + Kp2aLog.Log(GetDisplayName(ioc) + " baseVersionHash = " + hash); return hash; } public string GetLocalVersionHash(IOConnectionInfo ioc) { string hash = File.ReadAllText(VersionFilePath(ioc)); - Kp2aLog.Log(ioc.GetDisplayName() + " localVersionHash = " + hash); + + Kp2aLog.Log(GetDisplayName(ioc) + " localVersionHash = " + hash); return hash; } public bool HasLocalChanges(IOConnectionInfo ioc) diff --git a/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs b/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs index a33a9999..f2016654 100644 --- a/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs +++ b/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs @@ -348,7 +348,7 @@ namespace keepass2android.Io } catch (Exception e) { - throw new Exception("Error finding " + filename + " in " + folderPath.GetDisplayName(), e); + throw new Exception("Error finding " + filename + " in " + GetDisplayName(folderPath), e); } }