diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-26 18:16:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-26 18:16:43 +0000 |
commit | 404e500ea39d5bd24b46cb214ef731f20c515867 (patch) | |
tree | 6f8325d4a6cab6d67f8596a9289ba8b4859538b1 /plugins/FTPFileYM/src/serverlist.cpp | |
parent | 6a1a045e620dba38a7a64070af59d1a91b104921 (diff) |
fix for bug with empty url
git-svn-id: http://svn.miranda-ng.org/main/trunk@15037 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/src/serverlist.cpp')
-rw-r--r-- | plugins/FTPFileYM/src/serverlist.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/FTPFileYM/src/serverlist.cpp b/plugins/FTPFileYM/src/serverlist.cpp index 50814f92cf..878bbd87a6 100644 --- a/plugins/FTPFileYM/src/serverlist.cpp +++ b/plugins/FTPFileYM/src/serverlist.cpp @@ -72,13 +72,15 @@ ServerList::FTP::FTP(int index) DB::getAStringF(0, MODULE, "Url%d", index, m_szUrl);
DB::getAStringF(0, MODULE, "Dir%d", index, m_szDir);
DB::getAStringF(0, MODULE, "Chmod%d", index, m_szChmod);
+ if (m_szUrl[0] == 0)
+ strcpy(m_szUrl, "/");
m_ftpProto = (FTP::EProtoType)DB::getWordF(0, MODULE, "FtpProto%d", index, FTP::FT_STANDARD);
m_iPort = DB::getWordF(0, MODULE, "Port%d", index, 21);
m_bPassive = DB::getByteF(0, MODULE, "Passive%d", index, 0) ? true : false;
m_bEnabled = DB::getByteF(0, MODULE, "Enabled%d", index, 0) ? true : false;
}
-ServerList::FTP *ServerList::getSelected() const
+ServerList::FTP* ServerList::getSelected() const
{
return ftpList[opt.selected];
}
@@ -88,7 +90,7 @@ bool ServerList::FTP::isValid() const return (m_bEnabled && m_szServer[0] && m_szUser[0] && m_szPass[0] && m_szUrl[0]) ? true : false;
}
-char *ServerList::FTP::getProtoString() const
+char* ServerList::FTP::getProtoString() const
{
switch (m_ftpProto) {
case FT_STANDARD:
|