diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-09-10 12:14:57 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-09-10 12:14:57 +0000 |
| commit | 97ffdf3eb2baac3fafca86cc442ba5aedd3ae35b (patch) | |
| tree | 1651059fa03ae8d1a1b00edded521ff0ad550787 /src | |
| parent | 870989f868ee60bd1c8af59af5c3e80c51614447 (diff) | |
2009-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use File::isFile() instead of File::exists(). Updated message when
a path is not a file.
* src/OptionHandlerImpl.cc
* src/message.h
Diffstat (limited to 'src')
| -rw-r--r-- | src/OptionHandlerImpl.h | 4 | ||||
| -rw-r--r-- | src/message.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/OptionHandlerImpl.h b/src/OptionHandlerImpl.h index 2ab09963..b4bbc210 100644 --- a/src/OptionHandlerImpl.h +++ b/src/OptionHandlerImpl.h @@ -587,9 +587,9 @@ public: virtual void parseArg(Option& option, const std::string& optarg) { - if(!File(optarg).exists()) { + if(!File(optarg).isFile()) { throw DL_ABORT_EX - (StringFormat(MSG_FILE_NOT_EXIST, optarg.c_str()).str()); + (StringFormat(MSG_NOT_FILE, optarg.c_str()).str()); } option.put(_optName, optarg); } diff --git a/src/message.h b/src/message.h index 21a0d2d2..763b1418 100644 --- a/src/message.h +++ b/src/message.h @@ -174,7 +174,7 @@ #define MSG_GID_NOT_PROVIDED "GID is not provided." #define MSG_CANNOT_PARSE_XML_RPC_REQUEST "Failed to parse xml-rpc request." #define MSG_GOOD_BYE_SEEDER "Client is in seed state: Good Bye Seeder;)" -#define MSG_FILE_NOT_EXIST "File '%s' was not found." +#define MSG_NOT_FILE "'%s' is not a file." #define EX_TIME_OUT _("Timeout.") #define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.") |
