Index: include/server.h =================================================================== --- include/server.h (revision 3450) +++ include/server.h (working copy) @@ -26,6 +26,7 @@ HPNONSTOP, DOS_VIRTUAL, CYGWIN, + USS, SERVERTYPE_MAX }; Index: engine/server.cpp =================================================================== --- engine/server.cpp (revision 3450) +++ engine/server.cpp (working copy) @@ -29,7 +29,8 @@ _T("z/VM"), _T("HP NonStop"), wxTRANSLATE("DOS-like with virtual paths"), - _T("Cygwin") + _T("Cygwin"), + _T("z/OS: Unix System Services (USS)") }; CServer::CServer() Index: engine/serverpath.cpp =================================================================== --- engine/serverpath.cpp (revision 3450) +++ engine/serverpath.cpp (working copy) @@ -26,7 +26,8 @@ { '/', true, 0, 0, false, 0, 0, true, false }, // Same as Unix { '.', false, 0, 0, false, 0, 0, false, false }, { '\\', true, 0, 0, false, 0, 0, true, false }, - { '/', true, 0, 0, false, 0, 0, true, true } // Cygwin is like Unix but has optional prefix of form "//server" + { '/', true, 0, 0, false, 0, 0, true, true }, // Cygwin is like Unix but has optional prefix of form "//server" + { '/', true, 0, 0, false, 0, 0, true, false } // z/os-USS (UNIX SYSTEM SERVICES }; CServerPathData::CServerPathData() @@ -603,6 +604,36 @@ if (!Segmentize(dir, data.m_segments)) return false; break; + case USS: + { + // Remove the double quoation some servers send in PWD reply + int i = 0; + wxChar c = dir.c_str()[i]; + while (c == FTP_MVS_DOUBLE_QUOTE) + c = dir.c_str()[++i]; + dir.Remove(0, i); + + while (dir != _T("")) + { + c = dir.Last(); + if (c != FTP_MVS_DOUBLE_QUOTE) + break; + else + dir.RemoveLast(); + } + if (dir[0] == traits[m_type].separator) + data.m_segments.clear(); + else if (m_bEmpty) + return false; + + if (isFile && !ExtractFile(dir, file)) + return false; + + if (!Segmentize(dir, data.m_segments)) + return false; + } + break; + case HPNONSTOP: if (dir[0] == '\\') data.m_segments.clear();