mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
getTable(): Don't prepend slash if key already starts with it.
This makes getTable("/foo") and getTable("foo") equivalent.
This commit is contained in:
@@ -174,7 +174,7 @@ public class NetworkTable implements ITable, IRemote {
|
||||
public synchronized static NetworkTable getTable(String key) {
|
||||
if (!running)
|
||||
initialize();
|
||||
if (key.isEmpty())
|
||||
if (key.isEmpty() || key.charAt(0) == PATH_SEPARATOR)
|
||||
return new NetworkTable(key);
|
||||
return new NetworkTable(PATH_SEPARATOR + key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user