Skip to content

Commit

Permalink
Removing unused code
Browse files Browse the repository at this point in the history
Source commit: 623b092c5b1612027187f1a8de819e0bc60fbd6b
  • Loading branch information
martinprikryl committed Jan 28, 2018
1 parent 65a8629 commit ee1a6cc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 112 deletions.
1 change: 0 additions & 1 deletion source/filezilla/FileZillaApi.h
Expand Up @@ -185,7 +185,6 @@ class CGssNeedUserRequestData : public CAsyncRequestData
#define FZ_SERVERTYPE_LAYERMASK 0x0FF0

#define FZ_SERVERTYPE_FTP 0x1000
#define FZ_SERVERTYPE_LOCAL 0x2000

#define FZ_SERVERTYPE_LAYER_SSL_IMPLICIT 0x0100
#define FZ_SERVERTYPE_LAYER_SSL_EXPLICIT 0x0200
Expand Down
108 changes: 0 additions & 108 deletions source/filezilla/ServerPath.cpp
Expand Up @@ -129,30 +129,6 @@ CServerPath::CServerPath(CString path, int nServerType, bool trim)
break;
}
break;
case FZ_SERVERTYPE_LOCAL:
{
path.TrimRight( L"\\" );
while (path.Replace( L"\\\\", L"\\" ));
int pos = path.Find( L"\\" );
if (pos == -1)
{
m_Prefix = path;
return;
}
DebugAssert(pos == 2);
m_Prefix = path.Left(pos);
path = path.Mid(pos + 1);
pos = path.Find( L"\\" );
while (pos != -1)
{
m_Segments.push_back(path.Left(pos));
path=path.Mid(pos + 1);
pos=path.Find( L"\\" );
}
if (path != L"")
m_Segments.push_back(path);
}
break;
default:
DebugFail();
}
Expand Down Expand Up @@ -327,43 +303,6 @@ BOOL CServerPath::SetPath(CString &newpath, BOOL bIsFile /*=FALSE*/)
break;
}
break;
case FZ_SERVERTYPE_LOCAL:
{
if (bIsFile)
{
if (path.Right(1)!= L"\\" )
{
int rpos=path.ReverseFind(L'\\');
if (rpos==-1)
return FALSE;

file=path.Mid(rpos+1);
path=path.Left(rpos);
}
else
return FALSE;
}
path.TrimRight( L"\\" );
while (path.Replace( L"\\\\", L"\\" ));
int pos=path.Find( L":\\" );
if (pos==-1 || pos!=1)
return FALSE;
else
{
m_Prefix=path.Left(pos+1);
path=path.Mid(pos+2);
}
pos=path.Find( L"\\" );
while (pos!=-1)
{
m_Segments.push_back(path.Left(pos));
path=path.Mid(pos+1);
pos=path.Find( L"\\" );
}
if (path!=L"")
m_Segments.push_back(path);
}
break;
}
if (bIsFile)
newpath = file;
Expand Down Expand Up @@ -406,14 +345,6 @@ const CString CServerPath::GetPath() const
path+=*iter + L"/";
break;
}
break;
case FZ_SERVERTYPE_LOCAL:
path=m_Prefix;
if (!m_Segments.empty())
path+=L"\\";
for (iter=m_Segments.begin(); iter!=m_Segments.end(); iter++)
path+=*iter + L"\\";

break;
default:
DebugFail();
Expand Down Expand Up @@ -467,12 +398,6 @@ const bool CServerPath::operator==(const CServerPath &op) const
return true;
}

const BOOL operator==(const CServerPath &a, const CString &b)
{
CServerPath path(b);
return a==path;
}

const bool CServerPath::operator!=(const CServerPath &op) const
{
if (!this)
Expand Down Expand Up @@ -518,29 +443,6 @@ const BOOL CServerPath::IsEmpty() const
return m_bEmpty;
}

CString CServerPath::GetSafePath() const
{
if (m_bEmpty)
return L"";

CString safepath;
safepath.Format(L"%d %d ", m_nServerType, m_Prefix.GetLength());
if (m_Prefix!=L"")
safepath+=m_Prefix+L" ";
tConstIter iter = m_Segments.begin();
while(iter!=m_Segments.end())
{
CString len;
len.Format(L"%d ", iter->GetLength());
safepath+=len;
safepath+=*iter;
iter++;
if (iter!=m_Segments.end())
safepath+=L" ";
}
return safepath;
}

BOOL CServerPath::AddSubdir(CString subdir)
{
subdir.TrimLeft( L" " );
Expand Down Expand Up @@ -628,16 +530,6 @@ CString CServerPath::FormatFilename(CString fn, bool omitPath /*=false*/) const
break;
}
break;
case FZ_SERVERTYPE_LOCAL:
if (omitPath)
return fn;
path=m_Prefix;
if (!m_Segments.empty())
path+=L"\\";
for (iter=m_Segments.begin(); iter!=m_Segments.end(); iter++)
path+=*iter + L"\\";
path += fn;
break;
default:
DebugFail();
}
Expand Down
3 changes: 0 additions & 3 deletions source/filezilla/ServerPath.h
Expand Up @@ -6,7 +6,6 @@ class CServerPath
{
public:
BOOL AddSubdir(CString subdir);
CString GetSafePath() const;
const BOOL IsEmpty() const;
CServerPath GetParent() const;
BOOL HasParent() const;
Expand Down Expand Up @@ -40,6 +39,4 @@ class CServerPath
int m_nServerType;
};
//---------------------------------------------------------------------------
const BOOL operator==(const CServerPath & a, const CString & b);
//---------------------------------------------------------------------------
#endif // ServerPathH

0 comments on commit ee1a6cc

Please sign in to comment.