}
if (RollerAtomHandler.canEdit(user, website) && pathInfo.length > 1) {
try {
String path = filePathFromPathInfo(pathInfo);
String fileName = path.substring(0, path.length() - ".media-link".length());
MediaFileManager fmgr = roller.getMediaFileManager();
MediaFile mf = fmgr.getMediaFileByPath(website, path);
fmgr.removeMediaFile(website, mf);
log.debug("Deleted media entry: " + fileName);
return;
} catch (Exception e) {
String msg = "ERROR deleting media entry";