~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/engine/serverpath.cpp

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2012-12-07 17:17:17 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20121207171717-nt6as62u4pa1uv11
Tags: 3.6.0.2-1ubuntu1
* Merge from Debian experimental. Remaining Ubuntu change:
   - Added debian/patches/11_use-decimal-si-by-default.patch in order to
     comply with UnitsPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
};
19
19
 
20
20
static const CServerTypeTraits traits[SERVERTYPE_MAX] = {
21
 
        { _T("/"),  true,  0,    0,    false, 0, 0,   true,  false }, // Failsafe
22
 
        { _T("/"),  true,  0,    0,    false, 0, 0,   true,  false },
23
 
        { _T("."),  false, '[',  ']',  false, 0, '^', false, false },
24
 
        { _T("\\/"), false, 0,    0,    false, 0, 0,   true,  false },
25
 
        { _T("."),  false, '\'', '\'', true,  1, 0,   false, false },
26
 
        { _T("/"),  true,  0,    0,    false, 0, 0,   true,  false },
27
 
        { _T("/"),  true,  0,    0,    false, 0, 0,   true,  false }, // Same as Unix
28
 
        { _T("."),  false, 0,    0,    false, 0, 0,   false, false },
29
 
        { _T("\\"), true,  0,    0,    false, 0, 0,   true,  false },
30
 
        { _T("/"),  true,  0,    0,    false, 0, 0,   true,  true  } // Cygwin is like Unix but has optional prefix of form "//server"
 
21
        { _T("/"),   true,     0,    0,    false, 0, 0,   true,  false }, // Failsafe
 
22
        { _T("/"),   true,     0,    0,    false, 0, 0,   true,  false },
 
23
        { _T("."),   false,  '[',  ']',    false, 0, '^', false, false },
 
24
        { _T("\\/"), false,    0,    0,    false, 0, 0,   true,  false },
 
25
        { _T("."),   false, '\'', '\'',     true, 1, 0,   false, false },
 
26
        { _T("/"),   true,     0,    0,    false, 0, 0,   true,  false },
 
27
        { _T("/"),   true,     0,    0,    false, 0, 0,   true,  false }, // Same as Unix
 
28
        { _T("."),   false,    0,    0,    false, 0, 0,   false, false },
 
29
        { _T("\\"),  true,     0,    0,    false, 0, 0,   true,  false },
 
30
        { _T("/"),   true,     0,    0,    false, 0, 0,   true,  true  } // Cygwin is like Unix but has optional prefix of form "//server"
31
31
};
32
32
 
33
33
CServerPathData::CServerPathData()
35
35
}
36
36
 
37
37
CServerPathData::CServerPathData(const CServerPathData& v)
 
38
        : m_segments(v.m_segments)
 
39
        , m_prefix(v.m_prefix)
38
40
{
39
 
        m_prefix = v.m_prefix;
40
 
        m_segments = v.m_segments;
41
41
}
42
42
 
43
43
bool CServerPathData::operator==(const CServerPathData& cmp) const
52
52
}
53
53
 
54
54
CServerPath::CServerPath()
 
55
        : m_bEmpty(true)
 
56
        , m_type(DEFAULT)
55
57
{
56
 
        m_type = DEFAULT;
57
 
        m_bEmpty = true;
58
58
}
59
59
 
60
60
CServerPath::CServerPath(const CServerPath &path, wxString subdir)
61
 
        : m_data(path.m_data)
 
61
        : m_bEmpty(path.m_bEmpty)
 
62
        , m_type(path.m_type)
 
63
        , m_data(path.m_data)
62
64
{
63
 
        m_type = path.m_type;
64
 
        m_bEmpty = path.m_bEmpty;
65
 
 
66
65
        if (subdir == _T(""))
67
66
                return;
68
67
 
71
70
}
72
71
 
73
72
CServerPath::CServerPath(const CServerPath &path)
74
 
        : m_data(path.m_data)
 
73
        : m_bEmpty(path.m_bEmpty)
 
74
        , m_type(path.m_type)
 
75
        , m_data(path.m_data)
75
76
{
76
 
        m_type = path.m_type;
77
 
        m_bEmpty = path.m_bEmpty;
78
77
}
79
78
 
80
79
CServerPath::CServerPath(wxString path, ServerType type /*=DEFAULT*/)
 
80
        : m_type(type)
81
81
{
82
 
        m_type = type;
83
 
 
84
82
        SetPath(path);
85
83
}
86
84
 
380
378
 
381
379
                p += prefix_len + 1;
382
380
        }
383
 
        
 
381
 
384
382
        while (len > (p - begin))
385
383
        {
386
384
                int segment_len = 0;
926
924
        parent.m_type = m_type;
927
925
 
928
926
        CServerPathData& parentData = parent.m_data.Get();
929
 
        
 
927
 
930
928
        tConstSegmentIter last = m_data->m_segments.end();
931
929
        tConstSegmentIter last2 = path.m_data->m_segments.end();
932
930
        if (traits[m_type].prefixmode == 1)