Removed separator "/" in file name and string.format
This commit is contained in:
parent
cd7a8e6a75
commit
1c813b7352
@ -90,9 +90,7 @@ public final class SibaCLI
|
|||||||
*/
|
*/
|
||||||
public static void check(final File fileToCheck) throws SibaException
|
public static void check(final File fileToCheck) throws SibaException
|
||||||
{
|
{
|
||||||
boolean result;
|
if (SibaManager.check(fileToCheck))
|
||||||
result = SibaManager.check(fileToCheck);
|
|
||||||
if (result)
|
|
||||||
{
|
{
|
||||||
String message = String.format(BUNDLE.getString("confirmDialogGood.text"), fileToCheck.getName());
|
String message = String.format(BUNDLE.getString("confirmDialogGood.text"), fileToCheck.getName());
|
||||||
System.out.println(message);
|
System.out.println(message);
|
||||||
@ -138,7 +136,7 @@ public final class SibaCLI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message = "An error occured: " + exception.getClass() + "(" + exception.getMessage() + ")";
|
message = String.format("An error occured: %1s(%2s)", exception.getClass(), exception.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.error("uncaughtException ", exception);
|
logger.error("uncaughtException ", exception);
|
||||||
|
@ -231,12 +231,12 @@ public final class SibaUtils
|
|||||||
in.close();
|
in.close();
|
||||||
if (choosenFile.isAbsolute())
|
if (choosenFile.isAbsolute())
|
||||||
{
|
{
|
||||||
result = new File(choosenFile.getParent() + "/" + fileNameToString);
|
result = new File(choosenFile.getParent(), fileNameToString);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String path = System.getProperty("user.dir");
|
String path = System.getProperty("user.dir");
|
||||||
result = new File(path + "/" + fileNameToString);
|
result = new File(path, fileNameToString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user