[
https://issues.apache.org/jira/browse/JCS-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15355812#comment-15355812
]
Ryan Fong commented on JCS-163:
-------------------------------
This appears to be fixed in trunk which didn't make the beta-1 release. Can we
expect a beta-2 soon?
http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.java?r1=1593844&r2=1670674&pathrev=1719104&diff_format=h
> false error message when reusing a cache directory
> --------------------------------------------------
>
> Key: JCS-163
> URL: https://issues.apache.org/jira/browse/JCS-163
> Project: Commons JCS
> Issue Type: Bug
> Components: Indexed Disk Cache, JDBC Disk Cache
> Affects Versions: jcs-2.0-beta-1
> Reporter: Mark Fulton
>
> JCS logs an {{ERROR}} if the disk cache directory already existed:
> {noformat}
> 63 [main] ERROR
> org.apache.commons.jcs.auxiliary.disk.AbstractDiskCacheAttributes - Failed
> to create directory C:\MyCache
> {noformat}
> This is because
> [{{AbstractDiskCacheAttributes.setDiskPath(File)}}|http://commons.apache.org/proper/commons-jcs/commons-jcs-core/apidocs/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.html#setDiskPath(java.io.File)]
>
> [uses|http://commons.apache.org/proper/commons-jcs/commons-jcs-core/xref/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCacheAttributes.html#L80]
> the result of
> [{{File.mkdirs()}}|http://docs.oracle.com/javase/6/docs/api/java/io/File.html#mkdirs()]
> as if it returns {{true}} if the directories exist after invocation but this
> is not the case, it only returns "{{true}} if and only if the directory was
> created, along with all necessary parent directories; {{false}} otherwise."
> [{{File.exists()}}|http://docs.oracle.com/javase/6/docs/api/java/io/File.html#exists()]
> (or similar) should be used instead to trigger logging an {{ERROR}} or not.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)