Skip to content

Commit

Permalink
JCR-973 XML import using MacOS X WebDAV client does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
anchela committed Jun 22, 2007
1 parent 2250295 commit 1003231
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -146,7 +146,14 @@ public String getContentLanguage() {
* @see ImportContext#getContentLength()
*/
public long getContentLength() {
return (inputCtx != null) ? inputCtx.getContentLength() : IOUtil.UNDEFINED_LENGTH;
if (inputCtx != null) {
return inputCtx.getContentLength();
} else if (inputFile != null) {
return inputFile.length();
} else {
log.debug("Unable to determine content length -> default value = " + IOUtil.UNDEFINED_LENGTH);
return IOUtil.UNDEFINED_LENGTH;
}
}

/**
Expand Down

0 comments on commit 1003231

Please sign in to comment.