Allow users to specify a port in a non-standard directory

This commit is contained in:
hedgecrw85 2016-01-04 09:27:11 -06:00
parent 9ae2f07f2a
commit ff5617118d
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ public final class SerialPort
portDescriptor = "\\\\.\\" + portDescriptor.substring(portDescriptor.lastIndexOf('\\')+1);
else if (portDescriptor.contains("/pts/"))
portDescriptor = "/dev/pts/" + portDescriptor.substring(portDescriptor.lastIndexOf('/')+1);
else
else if (!((new File(portDescriptor)).exists()))
portDescriptor = "/dev/" + portDescriptor.substring(portDescriptor.lastIndexOf('/')+1);
// Create SerialPort object