boolean (@NotNull String linuxPath) { int slashInd = linuxPath.indexOf('/'); while (slashInd >= 0) { int nextSlashInd = linuxPath.indexOf('/', slashInd + 1); if ((nextSlashInd == slashInd + 2 || (nextSlashInd == -1 && slashInd + 2 == linuxPath.length())) && OSAgnosticPathUtil.isDriveLetter(linuxPath.charAt(slashInd + 1))) { return true; } slashInd = nextSlashInd; } return false; }