mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
File browser actions were disabled for broken symbolic links
This made it impossible to move a broken symbolic link to trash.
This commit is contained in:
@@ -1252,8 +1252,9 @@ static NSMutableSet* SymmetricDifference (NSMutableSet* aSet, NSMutableSet* anot
|
||||
static std::set<SEL> const requireSelection{ @selector(didDoubleClickOutlineView:), @selector(editSelectedEntries:), @selector(duplicateSelectedEntries:), @selector(cut:), @selector(copy:), @selector(delete:) };
|
||||
|
||||
NSUInteger selectedFiles = 0;
|
||||
struct stat buf;
|
||||
for(FSItem* item in self.selectedItems)
|
||||
selectedFiles += [item.url isFileURL] && path::exists([[item.url path] fileSystemRepresentation]) ? 1 : 0;
|
||||
selectedFiles += [item.url isFileURL] && lstat([[item.url path] fileSystemRepresentation], &buf) == 0 ? 1 : 0;
|
||||
|
||||
if([item action] == @selector(goToParentFolder:))
|
||||
res = ParentForURL(_url) != nil;
|
||||
|
||||
Reference in New Issue
Block a user