public static String normalizeEntryPath ( String entryPath ) { if ( entryPath == null || entryPath . isEmpty ( ) ) return "" ; entryPath = entryPath . replace ( "\\" , "/" ) ; if ( entryPath . startsWith ( "/" ) ) { if ( entryPath . length ( ) == 1 ) { entryPath = "" ; } else { entryPath = entryPath . substring ( 1 , entryPath . length ( ) ) ; } } return entryPath ; }
Normalize a relative entry path so that it can be used in an archive .