Author: andre Date: 2010-06-29 15:59:16 +0200 (Tue, 29 Jun 2010) New Revision: 42741
Modified: mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/createcaches/TranscoderResult.java Log: some debug doing directory listing and showing current files in that directory Modified: mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/createcaches/TranscoderResult.java =================================================================== --- mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/createcaches/TranscoderResult.java 2010-06-29 13:07:58 UTC (rev 42740) +++ mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/createcaches/TranscoderResult.java 2010-06-29 13:59:16 UTC (rev 42741) @@ -67,8 +67,28 @@ if (dest != null) { File outFile = new File(directory, dest.getStringValue("url").replace("/", File.separator)); int count = 0; + while ((!outFile.exists() || outFile.length() < 1) && count < 12) { LOG.service("Result ready, but file " + outFile + (outFile.exists() ? " is too small" : " doesn't exists") + ". Waiting 10 sec. to be sure filesystem is ready (" + count + ")"); + + if (LOG.isDebugEnabled()) { // show files in same directory + String myfile = dest.getStringValue("url").replace("/", File.separator); + String mydir = myfile.substring(0, myfile.lastIndexOf('/')); + + String dirlist[] = directory.list(); + if (mydir.length() > 0) { + File mydirFile = new File(directory, mydir.replace("/", File.separator) ); + dirlist = mydirFile.list(); + } + + StringBuilder files = new StringBuilder("Files in same dir: "); + for (int i = 0; i < dirlist.length; i++) { + files.append(dirlist[i]).append(" "); + } + LOG.debug(files.toString()); + } + + try { Thread.currentThread().sleep(10000); count++; _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs