OSDN Git Service
(root)
/
stew
/
Stew4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
indicate the absolute path when using -f option with a invalid path
[stew/Stew4.git]
/
src
/
net
/
argius
/
stew
/
CommandProcessor.java
diff --git
a/src/net/argius/stew/CommandProcessor.java
b/src/net/argius/stew/CommandProcessor.java
index
1d2cd49
..
64383cf
100644
(file)
--- a/
src/net/argius/stew/CommandProcessor.java
+++ b/
src/net/argius/stew/CommandProcessor.java
@@
-3,9
+3,7
@@
package net.argius.stew;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.io.*;
import java.sql.*;
import java.util.*;
-
import javax.script.*;
import javax.script.*;
-
import net.argius.stew.io.*;
import net.argius.stew.ui.*;
import net.argius.stew.io.*;
import net.argius.stew.ui.*;
@@
-109,7
+107,7
@@
final class CommandProcessor {
outputMessage("i.exit");
return false;
}
outputMessage("i.exit");
return false;
}
- // connect
+ // connect
if (commandName.equalsIgnoreCase("connect") || commandName.equalsIgnoreCase("-c")) {
connect(p);
return true;
if (commandName.equalsIgnoreCase("connect") || commandName.equalsIgnoreCase("-c")) {
connect(p);
return true;
@@
-117,7
+115,12
@@
final class CommandProcessor {
// from file
if (commandName.equals("-f")) {
final File file = Path.resolve(env.getCurrentDirectory(), p.at(1));
// from file
if (commandName.equals("-f")) {
final File file = Path.resolve(env.getCurrentDirectory(), p.at(1));
+ final String abspath = file.getAbsolutePath();
+ if (log.isDebugEnabled()) {
+ log.debug("absolute path = [%s]", abspath);
+ }
if (!file.isFile()) {
if (!file.isFile()) {
+ outputMessage("e.file-not-exists", abspath);
throw new UsageException(res.get("usage.-f"));
}
log.debug("-f %s", file.getAbsolutePath());
throw new UsageException(res.get("usage.-f"));
}
log.debug("-f %s", file.getAbsolutePath());