Fixed a bug in APL plugin with image files containing # in name

CQTexperiment
vasfed 2008-05-18 08:04:46 +00:00
parent e063790e93
commit f9f0891f6c
7 changed files with 6 additions and 63 deletions

View File

@ -755,6 +755,7 @@
bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0);
modifier1_pressed |= ((mods & kCGEventFlagMaskShift)!=0);
bool should_clean = false;
if (src >= OpenFinder_Related && src <= OpenFinder_Related_end)
@ -775,6 +776,7 @@
CFRelease(event);
bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0);
modifier1_pressed |= ((mods & kCGEventFlagMaskShift)!=0);
bool should_autoplay = false;
if (src >= OpenFinder_Related && src <= OpenFinder_Related_end)

View File

@ -1,11 +1,3 @@
//
// CueSheetDecoder.m
// CueSheet
//
// Created by Zaphod Beeblebrox on 10/8/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import "APLDecoder.h"
#import "APLFile.h"

View File

@ -1,10 +1,3 @@
//
// APLFile.h
// APL
//
// Created by ??????? ???????? on 10/18/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>

View File

@ -1,10 +1,4 @@
//
// APLFile.m
// APL
//
// Created by ??????? ???????? on 10/18/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import "APLFile.h"
#import "ApeTag.h"
@ -33,33 +27,17 @@
{
NSRange protocolRange = [path rangeOfString:@"://"];
if (protocolRange.location != NSNotFound)
{
return [NSURL URLWithString:path];
}
NSMutableString *unixPath = [path mutableCopy];
NSString *fragment = @"";
NSRange fragmentRange = [path rangeOfString:@"#"];
if (fragmentRange.location != NSNotFound)
{
fragmentRange = NSMakeRange(fragmentRange.location, [unixPath length] - fragmentRange.location);
fragment = [unixPath substringWithRange:fragmentRange];
[unixPath deleteCharactersInRange:fragmentRange];
}
if (![unixPath hasPrefix:@"/"]) {
//Only relative paths would have windows backslashes.
[unixPath replaceOccurrencesOfString:@"\\" withString:@"/" options:0 range:NSMakeRange(0, [unixPath length])];
NSString *basePath = [[[baseFilename stringByStandardizingPath] stringByDeletingLastPathComponent] stringByAppendingString:@"/"];
[unixPath insertString:basePath atIndex:0];
}
//Append the fragment
return [NSURL URLWithString:[[[NSURL fileURLWithPath:unixPath] absoluteString] stringByAppendingString: fragment]];
}
return [NSURL URLWithString:[[NSURL fileURLWithPath:unixPath] absoluteString]];
}
-initWithFile:(NSString*)filename {
@ -100,7 +78,7 @@
{
[file release];
file = [self urlForPath:value relativeTo:filename];
//NSLog(@"APL refers to file '%@'", file);
NSLog(@"APL refers to file '%@' read '%@'", file, value);
continue;
}
if (![field compare:@"Start Block" options:NSCaseInsensitiveSearch])

View File

@ -1,10 +1,3 @@
//
// CueSheetMetadataReader.h
// CueSheet
//
// Created by Vincent Spader on 10/12/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>

View File

@ -1,11 +1,3 @@
//
// ApeTag.h
// MacApl
//
// Created by ??????? ???????? on 10/15/07.
// Copyright 2007 Vasfed. All rights reserved.
//
#import <Cocoa/Cocoa.h>
//not full support!! and even may have not enougth checks to find a non-supported data!

View File

@ -1,10 +1,3 @@
//
// ApeTag.mm
// MacApl
//
// Created by ??????? ???????? on 10/15/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
// as simple as it can be - just write a readable tag, no options etc.