Commits

cheryl committed 84ed36c

fixing viewing nested source path error

  • Participants
  • Parent commits 7ae0c21

Comments (0)

Files changed (1)

File src/com/saibotd/bitbeaker/SourceBrowserActivity.java

     	ListView listView = (ListView) findViewById(R.id.repositories_list);
 		try {
 			JSONObject jsonObject = new JSONObject(result);
+			String path = jsonObject.getString("path");
 			JSONArray dirs = jsonObject.getJSONArray("directories");
 			for(int i = 0; i < dirs.length(); i++){
 				jsonArray.put("dir_" + dirs.get(i));
 			}
 			JSONArray files = jsonObject.getJSONArray("files");
 			for(int i = 0; i < files.length(); i++){
-				jsonArray.put("fil_" + files.getJSONObject(i).getString("path"));
+				String filePath = files.getJSONObject(i).getString("path");
+				jsonArray.put("fil_" + filePath.replace(path, ""));
 			}
 		} catch (JSONException e) {
 			// TODO Auto-generated catch block