question: private String cleanupPath ( String fileName ) { if ( fileName == null ) { return null ; } fileName = fileName . replace ( "\\" , "/" ) ; fileName = fileName . replace ( "/+" , "/" ) ; if ( fileName . startsWith ( "./" ) ) { return fileName ; } if ( fileName . startsWith ( "/" ) ) { return "." + fileName ; } return "./" + fileName ; }
target:  clean up the path so that is looks like "./usr/local/file"