mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Added code to AddContentTagAction to handle current and parent directory entries
This commit is contained in:
@@ -59,7 +59,7 @@ public class AddContentTagAction extends AddTagAction {
|
||||
Collection<? extends AbstractFile> selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class);
|
||||
for (AbstractFile file : selectedFiles) {
|
||||
try {
|
||||
// Handle the special cases of "." and ".." directory entries.
|
||||
// Handle the special cases of current (".") and parent ("..") directory entries.
|
||||
if (file.getName().equals(".")) {
|
||||
Content parentFile = file.getParent();
|
||||
if (parentFile instanceof AbstractFile) {
|
||||
@@ -95,5 +95,5 @@ public class AddContentTagAction extends AddTagAction {
|
||||
JOptionPane.showMessageDialog(null, "Unable to tag " + file.getName() + ".", "Tagging Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user