diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js index 0a3ca24..e4b476a 100644 --- a/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js +++ b/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js @@ -300,7 +300,18 @@ } } } - // now content types + + // Check content type validation + if (!validator.info.contentType && !validator.info.excludedContentTypes){ + // Validation doesn't care about content type + return true; + } + + if (item.Directory){ + // Directories don't have content types so we can't validate against it. + return false; + } + var showCommand = true; var contentType = contentTypes ? mContentTypes.getFilenameContentType(item.Name, contentTypes) : null; contentType = contentType || {