You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by bu...@apache.org on 2005/10/27 14:46:08 UTC
DO NOT REPLY [Bug 37266] New: -
SimpleFileStore - files showing as directory (as ) - one line fix
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37266>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37266
Summary: SimpleFileStore - files showing as directory (as
<collection/>) - one line fix
Product: Slide
Version: Nightly
Platform: Other
OS/Version: other
Status: NEW
Severity: major
Priority: P2
Component: Core
AssignedTo: slide-dev@jakarta.apache.org
ReportedBy: dhartford@ghsinc.com
> SimpleFileStore.java
> =============================
> /**
> * Set resourceType to "<collection/>" for folders and set
> the contentLength for files.
> * Also set created and modified dates.
> */
> public NodeRevisionDescriptor retrieveRevisionDescriptor(Uri uri,
>
> NodeRevisionNumber revisionNumber)
> throws ServiceAccessException, RevisionDescriptorNotFoundException
> {
> log("retrieveRevisionDescriptor(" + uri + ")");
> File file = getFile(uri);
> if (!file.exists()) throw new
> RevisionDescriptorNotFoundException(uri.toString());
>
> NodeRevisionDescriptor descriptor = new
> NodeRevisionDescriptor(new NodeRevisionNumber(1, 0),
>
> NodeRevisionDescriptors.MAIN_BRANCH);
> descriptor.setCreationDate(new Date(file.lastModified()));
> descriptor.setLastModified(descriptor.getCreationDateAsDate());
>
> descriptor.setModificationDate(descriptor.getCreationDateAsDate());
> if (file.isDirectory())
> {
> descriptor.setResourceType(COLLECTION_TYPE);
> }
> else
> {
> /*************** 10/26/2006 DRH setResourceType null if not directory */
> descriptor.setResourceType(null);
> /*************** end fix */
> descriptor.setContentLength(file.length());
> }
> return descriptor;
> }
> ==============
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org