Author: ozeigermann Date: Fri Apr 13 17:24:58 2007 New Revision: 528713 URL: http://svn.apache.org/viewvc?view=rev&rev=528713 Log: Now the display name gets set with the file name as default.
Modified: jakarta/slide/trunk/wck/src/org/apache/slide/simple/store/WebdavStoreAdapter.java Modified: jakarta/slide/trunk/wck/src/org/apache/slide/simple/store/WebdavStoreAdapter.java URL: http://svn.apache.org/viewvc/jakarta/slide/trunk/wck/src/org/apache/slide/simple/store/WebdavStoreAdapter.java?view=diff&rev=528713&r1=528712&r2=528713 ============================================================================== --- jakarta/slide/trunk/wck/src/org/apache/slide/simple/store/WebdavStoreAdapter.java (original) +++ jakarta/slide/trunk/wck/src/org/apache/slide/simple/store/WebdavStoreAdapter.java Fri Apr 13 17:24:58 2007 @@ -818,13 +818,15 @@ } } + String fileName = getFileName(uri.toString()); + // this specific information overrides all explicit // properties if (store.isFolder(uri.toString())) { descriptor.setResourceType(NodeRevisionDescriptor.COLLECTION_TYPE); descriptor.setContentLength(0); } else { - String extension = getExtension(getFileName(uri.toString())); + String extension = getExtension(fileName); String type = getContentTypeForExtension(extension); if (type != null) { descriptor.setContentType(type); @@ -836,6 +838,10 @@ } } + if (!descriptor.exists(NodeRevisionDescriptor.NAME)) { + descriptor.setName(fileName); + } + Date creationDate = store.getCreationDate(uri.toString()); if (creationDate != null) { descriptor.setCreationDate(creationDate); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]