if(sr.isRealRecord()){//only deal with ones which are separate Records in the services
JSONObject existingcsid = new JSONObject();
JSONObject updatecsid = new JSONObject();
JSONArray createcsid = new JSONArray();
String getPath = serviceurl+filePath + "/" + sr.getServicesURL();
<BUG>String node = "/"+sr.getServicesListPath().split("/")[0]+"/*";</BUG>
Integer subcount = 0;
String firstfile = "";
while(!getPath.equals("")){
<BUG>JSONObject data = getListView(creds,cache,getPath,node,"/"+sr.getServicesListPath(),"csid",false, sr);
String[] filepaths = (String[]) data.get("listItems");</BUG>
subcount +=filepaths.length;

if(sr.isRealRecord()){//only deal with ones which are separate Records in the services
JSONObject existingcsid = new JSONObject();
JSONObject updatecsid = new JSONObject();
JSONArray createcsid = new JSONArray();
String getPath = serviceurl+filePath + "/" + sr.getServicesURL();
Integer subcount = 0;
String firstfile = "";
while(!getPath.equals("")){
JSONObject data = getListView(creds,cache,getPath,sr.getServicesListPath(),"csid",false, sr);
String[] filepaths = (String[]) data.get("listItems");
subcount +=filepaths.length;
