Added force open in TextMate and fixed confusion when opening an alias.

Any file should be able to be opened within TextMate, so
Option-DblClick will always do that. I first noticed this with .xib
files.
Because of the order of the if statements, opening an alias to a
package or binary file (or .xib) would not have the previous if
statements applied to it.
This commit is contained in:
Steven Clukey
2013-01-24 12:19:22 -05:00
committed by Allan Odgaard
parent a7564b924c
commit c7035ded44

View File

@@ -777,16 +777,17 @@ static NSMutableSet* SymmetricDifference (NSMutableSet* aSet, NSMutableSet* anot
NSURL* itemURL = item.target ?: item.url;
FSItemURLType type = item.urlType;
if(type == FSItemURLTypePackage && OakIsAlternateKeyOrMouseEvent())
type = FSItemURLTypeFolder;
else if(type == FSItemURLTypeFile && is_binary([itemURL.path fileSystemRepresentation]))
type = FSItemURLTypePackage;
else if(type == FSItemURLTypeAlias)
if(type == FSItemURLTypeAlias)
{
FSItem* tmp = [FSItem itemWithURL:[NSURL fileURLWithPath:[NSString stringWithCxxString:path::resolve([itemURL.path fileSystemRepresentation])]]];
type = tmp.urlType;
itemURL = tmp.target ?: tmp.url;
}
if(type == FSItemURLTypePackage && OakIsAlternateKeyOrMouseEvent())
type = FSItemURLTypeFolder;
else if(type == FSItemURLTypeFile && is_binary([itemURL.path fileSystemRepresentation]) && !OakIsAlternateKeyOrMouseEvent())
type = FSItemURLTypePackage;
switch(type)
{