1 | Index: include/server.h
|
---|
2 | ===================================================================
|
---|
3 | --- include/server.h (revision 3450)
|
---|
4 | +++ include/server.h (working copy)
|
---|
5 | @@ -26,6 +26,7 @@
|
---|
6 | HPNONSTOP,
|
---|
7 | DOS_VIRTUAL,
|
---|
8 | CYGWIN,
|
---|
9 | + USS,
|
---|
10 |
|
---|
11 | SERVERTYPE_MAX
|
---|
12 | };
|
---|
13 | Index: engine/server.cpp
|
---|
14 | ===================================================================
|
---|
15 | --- engine/server.cpp (revision 3450)
|
---|
16 | +++ engine/server.cpp (working copy)
|
---|
17 | @@ -29,7 +29,8 @@
|
---|
18 | _T("z/VM"),
|
---|
19 | _T("HP NonStop"),
|
---|
20 | wxTRANSLATE("DOS-like with virtual paths"),
|
---|
21 | - _T("Cygwin")
|
---|
22 | + _T("Cygwin"),
|
---|
23 | + _T("z/OS: Unix System Services (USS)")
|
---|
24 | };
|
---|
25 |
|
---|
26 | CServer::CServer()
|
---|
27 | Index: engine/serverpath.cpp
|
---|
28 | ===================================================================
|
---|
29 | --- engine/serverpath.cpp (revision 3450)
|
---|
30 | +++ engine/serverpath.cpp (working copy)
|
---|
31 | @@ -26,7 +26,8 @@
|
---|
32 | { '/', true, 0, 0, false, 0, 0, true, false }, // Same as Unix
|
---|
33 | { '.', false, 0, 0, false, 0, 0, false, false },
|
---|
34 | { '\\', true, 0, 0, false, 0, 0, true, false },
|
---|
35 | - { '/', true, 0, 0, false, 0, 0, true, true } // Cygwin is like Unix but has optional prefix of form "//server"
|
---|
36 | + { '/', true, 0, 0, false, 0, 0, true, true }, // Cygwin is like Unix but has optional prefix of form "//server"
|
---|
37 | + { '/', true, 0, 0, false, 0, 0, true, false } // z/os-USS (UNIX SYSTEM SERVICES
|
---|
38 | };
|
---|
39 |
|
---|
40 | CServerPathData::CServerPathData()
|
---|
41 | @@ -603,6 +604,36 @@
|
---|
42 | if (!Segmentize(dir, data.m_segments))
|
---|
43 | return false;
|
---|
44 | break;
|
---|
45 | + case USS:
|
---|
46 | + {
|
---|
47 | + // Remove the double quoation some servers send in PWD reply
|
---|
48 | + int i = 0;
|
---|
49 | + wxChar c = dir.c_str()[i];
|
---|
50 | + while (c == FTP_MVS_DOUBLE_QUOTE)
|
---|
51 | + c = dir.c_str()[++i];
|
---|
52 | + dir.Remove(0, i);
|
---|
53 | +
|
---|
54 | + while (dir != _T(""))
|
---|
55 | + {
|
---|
56 | + c = dir.Last();
|
---|
57 | + if (c != FTP_MVS_DOUBLE_QUOTE)
|
---|
58 | + break;
|
---|
59 | + else
|
---|
60 | + dir.RemoveLast();
|
---|
61 | + }
|
---|
62 | + if (dir[0] == traits[m_type].separator)
|
---|
63 | + data.m_segments.clear();
|
---|
64 | + else if (m_bEmpty)
|
---|
65 | + return false;
|
---|
66 | +
|
---|
67 | + if (isFile && !ExtractFile(dir, file))
|
---|
68 | + return false;
|
---|
69 | +
|
---|
70 | + if (!Segmentize(dir, data.m_segments))
|
---|
71 | + return false;
|
---|
72 | + }
|
---|
73 | + break;
|
---|
74 | +
|
---|
75 | case HPNONSTOP:
|
---|
76 | if (dir[0] == '\\')
|
---|
77 | data.m_segments.clear();
|
---|