X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/cfe4273de5fd5d54f3933a9cb8b53cdd35e1b11d..76ba00b2b23f5c2079a6635dc5e661850c3c5dfb:/src/eu/alefzero/webdav/WebdavEntry.java diff --git a/src/eu/alefzero/webdav/WebdavEntry.java b/src/eu/alefzero/webdav/WebdavEntry.java index 032d996a..84c96fbd 100644 --- a/src/eu/alefzero/webdav/WebdavEntry.java +++ b/src/eu/alefzero/webdav/WebdavEntry.java @@ -24,6 +24,7 @@ import org.apache.jackrabbit.webdav.property.DavProperty; import org.apache.jackrabbit.webdav.property.DavPropertyName; import org.apache.jackrabbit.webdav.property.DavPropertySet; +import android.net.Uri; import android.util.Log; public class WebdavEntry { @@ -52,6 +53,10 @@ public class WebdavEntry { prop = propSet.get(DavPropertyName.GETCONTENTTYPE); if (prop != null) { mContentType = (String) prop.getValue(); + // dvelasco: some builds of ownCloud server 4.0.x added a trailing ';' to the MIME type ; if looks fixed, but let's be cautious + if (mContentType.indexOf(";") >= 0) { + mContentType = mContentType.substring(0, mContentType.indexOf(";")); + } } else { mContentType = "DIR"; /* @@ -88,6 +93,10 @@ public class WebdavEntry { public String path() { return mPath; } + + public String decodedPath() { + return Uri.decode(mPath); + } public String name() { return mName;