Externalize warning message in RefDirectory.delete()

Change-Id: Icec16c01853a3f5ea016d454b3d48624498efcce
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 5e68fe245f)
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
Matthias Sohn 2018-08-23 11:44:28 +02:00 committed by David Pursehouse
parent 94fad4412a
commit c78d6445ec
3 changed files with 4 additions and 1 deletions

View File

@ -647,6 +647,7 @@ truncatedHunkOldLinesMissing=Truncated hunk, at least {0} old lines is missing
tSizeMustBeGreaterOrEqual1=tSize must be >= 1
unableToCheckConnectivity=Unable to check connectivity.
unableToCreateNewObject=Unable to create new object: {0}
unableToRemovePath=Unable to remove path ''{0}''
unableToStore=Unable to store {0}.
unableToWrite=Unable to write {0}
unauthorized=Unauthorized

View File

@ -706,6 +706,7 @@ public static JGitText get() {
/***/ public String tSizeMustBeGreaterOrEqual1;
/***/ public String unableToCheckConnectivity;
/***/ public String unableToCreateNewObject;
/***/ public String unableToRemovePath;
/***/ public String unableToStore;
/***/ public String unableToWrite;
/***/ public String unauthorized;

View File

@ -1099,7 +1099,8 @@ private static void delete(final File file, final int depth, LockFile rLck)
// same prefix
break;
} catch (IOException e) {
LOG.warn("Unable to remove path {}", dir, e);
LOG.warn(MessageFormat.format(JGitText.get().unableToRemovePath,
dir), e);
break;
}
dir = dir.getParentFile();