From 404e500ea39d5bd24b46cb214ef731f20c515867 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 26 Aug 2015 18:16:43 +0000 Subject: fix for bug with empty url git-svn-id: http://svn.miranda-ng.org/main/trunk@15037 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FTPFileYM/src/serverlist.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/FTPFileYM/src/serverlist.cpp') 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: -- cgit v1.2.3