Allow users to specify a port in a non-standard directory
This commit is contained in:
parent
9ae2f07f2a
commit
ff5617118d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue