Allow "CD \" for UNC root path

This commit is contained in:
Wengier
2020-06-21 21:05:09 -04:00
committed by GitHub
parent 3d0e7001d4
commit dca9e4d2fa

View File

@@ -14,6 +14,9 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA.
*
* Heavy improvements by the DOSBox-X Team
* With major works from joncampbell123 and Wengier
*/
@@ -1010,6 +1013,9 @@ bool localDrive::TestDir(const char * dir) {
return false;
}
std::string temp_line=std::string(newdir);
if(temp_line.size() > 4 && temp_line[0]=='\\' && temp_line[1]=='\\' && temp_line[2]!='\\' && std::count(temp_line.begin()+3, temp_line.end(), '\\')==1) strcat(newdir,"\\");
// Skip directory test, if "\"
size_t len = strlen(newdir);
if (len && (newdir[len-1]!='\\')) {