return shorterPath;
return PathUtil.removeTrailingSlash(root);
    private static String getCommonAncestor(String path1, String path2) {    	// simplest case    	String longerPath = path1.length() > path2.length() ? path1 : path2;    	String shorterPath = path1.length() > path2.length() ? path2 : path1;    	// truncate shorter path till it longer is not starts with it    	while(!PathUtil.isEmpty(shorterPath)) {    		boolean rootFound = FSUtil.isWindows ?    				longerPath.toLowerCase().startsWith(shorterPath.toLowerCase()) :    				longerPath.startsWith(shorterPath);    		if (rootFound) {    			return shorterPath;    		}    		shorterPath = PathUtil.removeTail(shorterPath);    	}    	    	return shorterPath;    }