public static String normalizeLocalPath(final String localPath){
  if (localPath.endsWith("\\") && localPath.length() > 3) {
    return localPath.substring(0,localPath.length() - 1);
  }
  return localPath;
}

public static String normalizeLocalPath ( final String localPath ) { if ( localPath . endsWith ( "\\" ) && localPath . length ( ) > 3 ) { return localPath . substring ( 0 , localPath . length ( ) - 1 ) ; } return localPath ; }
remove any trailing " \ " from the end of a windows style local path .
