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
pull/1/head
Tatsuhiro Tsujikawa 2009-09-10 12:14:57 +00:00
parent 870989f868
commit 97ffdf3eb2
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,10 @@
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
2009-09-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2009-09-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that server performence profile is not updated when Fixed the bug that server performence profile is not updated when

View File

@ -587,9 +587,9 @@ public:
virtual void parseArg(Option& option, const std::string& optarg) virtual void parseArg(Option& option, const std::string& optarg)
{ {
if(!File(optarg).exists()) { if(!File(optarg).isFile()) {
throw DL_ABORT_EX 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); option.put(_optName, optarg);
} }

View File

@ -174,7 +174,7 @@
#define MSG_GID_NOT_PROVIDED "GID is not provided." #define MSG_GID_NOT_PROVIDED "GID is not provided."
#define MSG_CANNOT_PARSE_XML_RPC_REQUEST "Failed to parse xml-rpc request." #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_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_TIME_OUT _("Timeout.")
#define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.") #define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.")