~xdavidwu/saf-cephfs

d4c6480168d7027bbd6c0422a4a035be20792383 — xdavidwu 2 years ago 8315503
CephFSDocumentsProvider: lookup mime-type on symlinks
1 files changed, 2 insertions(+), 2 deletions(-)

M src/main/java/org/safcephfs/CephFSDocumentsProvider.java
M src/main/java/org/safcephfs/CephFSDocumentsProvider.java => src/main/java/org/safcephfs/CephFSDocumentsProvider.java +2 -2
@@ 300,7 300,7 @@ public class CephFSDocumentsProvider extends DocumentsProvider {
				if (!checkPermissions || (getPerm(cs) & PERM_WRITEABLE) == PERM_WRITEABLE) {
					row.add(Document.COLUMN_FLAGS, Document.FLAG_DIR_SUPPORTS_CREATE);
				}
			} else if (cs.isFile()) {
			} else if (cs.isFile() || cs.isSymlink()) {
				row.add(Document.COLUMN_MIME_TYPE, getMime(entry));
				if (!checkPermissions || (getPerm(cs) & PERM_WRITEABLE) == PERM_WRITEABLE) {
					row.add(Document.COLUMN_FLAGS, Document.FLAG_SUPPORTS_WRITE);


@@ 335,7 335,7 @@ public class CephFSDocumentsProvider extends DocumentsProvider {
			if (!checkPermissions || (getPerm(cs) & PERM_WRITEABLE) == PERM_WRITEABLE) {
				row.add(Document.COLUMN_FLAGS, Document.FLAG_DIR_SUPPORTS_CREATE);
			}
		} else if (cs.isFile()) {
		} else if (cs.isFile() || cs.isSymlink()) {
			row.add(Document.COLUMN_MIME_TYPE, getMime(filename));
			if (!checkPermissions || (getPerm(cs) & PERM_WRITEABLE) == PERM_WRITEABLE) {
				row.add(Document.COLUMN_FLAGS, Document.FLAG_SUPPORTS_WRITE);