Update parse file on google

This commit is contained in:
Victor Shcherb 2012-04-03 23:55:24 +02:00
parent 4c2e8051f6
commit 5d9b91154a
2 changed files with 5 additions and 9 deletions

View file

@ -100,18 +100,13 @@ public class DownloaderIndexFromGoogleCode {
private static String getIndexFiles(Map<String, String> files, String content, String prevFile, String ext){
int i = 0;
int prevI = -1;
if((i = content.indexOf(ext, i)) != -1) {
if(prevI > i){
files.put(prevFile, null);
prevI = i;
}
int i = content.indexOf(ext, 0);
if (i != -1) {
int j = i - 1;
while (content.charAt(j) == '_' || Character.isLetterOrDigit(content.charAt(j)) || content.charAt(j) == '-') {
j--;
}
if(content.substring(j + 1, i).endsWith("_")){ //$NON-NLS-1$
if (content.substring(j + 1, i).endsWith("_")) { //$NON-NLS-1$
prevFile = content.substring(j + 1, i) + ext;
}

View file

@ -278,6 +278,7 @@ public class IndexUploader {
}
if(deleteFileFilter != null) {
if(uploadCredentials instanceof UploadToGoogleCodeCredentials) {
log.info("About to delete files from googlecode");
Map<String, String> files = DownloaderIndexFromGoogleCode.getIndexFiles(new LinkedHashMap<String, String>());
for (String f : files.keySet()) {
System.out.println("File on googlecode " + f + " " + files.get(f));