Skip to content

Commit 0a283a4

Browse files
committed
[url path] does % unescaping, don't do it twice.
1 parent c1e6971 commit 0a283a4

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

Common.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
NSString *pathOfURL(CFURLRef url)
4949
{
5050
NSString *targetCFS = [[(NSURL *)url absoluteURL] path];
51-
return [targetCFS stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
51+
n8log(@"targetCFS = %@", targetCFS);
52+
//return [targetCFS stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
53+
return targetCFS;
5254
}
5355

5456
NSData *colorizeURL(CFBundleRef bundle, CFURLRef url, int *status, int thumbnail)
@@ -58,7 +60,9 @@
5860
//n8log(@"rsrcDirURL = %@", CFURLGetString(rsrcDirURL));
5961
NSString *rsrcEsc = pathOfURL(rsrcDirURL);
6062
CFRelease(rsrcDirURL);
63+
n8log(@"url = %@", url);
6164
NSString *targetEsc = pathOfURL(url);
65+
n8log(@"targetEsc = %@", targetEsc);
6266

6367
// Set up preferences
6468
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

QLColorCode.xcodeproj/project.pbxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@
244244
0E913A110D10B84D0067BAD6 /* Copy .conf Files */,
245245
0E9139D70D10A8320067BAD6 /* Install highlight */,
246246
0ECBBA6F0CFCA39E00416538 /* Copy to Library */,
247+
0E1280381061C3EA0078EC05 /* Reset qlmanage */,
247248
);
248249
buildRules = (
249250
);
@@ -299,6 +300,21 @@
299300
shellPath = "/bin/zsh -x";
300301
shellScript = "# shell script goes here\nif [ $BUILD_STYLE != \"Release\" ]; then\n echo \"Error: Must use Release build style\"\n exit 1\nfi\n\ncd $PROJECT_DIR\nmkdir -vp release\ncd release\npkgDir=QLColorCode-$CURRENT_PROJECT_VERSION\nrm -rf $pkgDir\nmkdir $pkgDir\ncp -rp $TARGET_BUILD_DIR/*.qlgenerator $pkgDir\ncp ../ReadMe.txt $pkgDir\ncp ../LICENSE.txt $pkgDir\ncp ../ChangeLog.txt $pkgDir\n# For some reason Xcode has been producing world-writable output on occasion\nchmod -R o-w $pkgDir\ntar cvzf $pkgDir.tgz $pkgDir\nopen $PROJECT_DIR/release";
301302
};
303+
0E1280381061C3EA0078EC05 /* Reset qlmanage */ = {
304+
isa = PBXShellScriptBuildPhase;
305+
buildActionMask = 2147483647;
306+
files = (
307+
);
308+
inputPaths = (
309+
);
310+
name = "Reset qlmanage";
311+
outputPaths = (
312+
);
313+
runOnlyForDeploymentPostprocessing = 0;
314+
shellPath = /bin/sh;
315+
shellScript = "qlmanage -r";
316+
showEnvVarsInLog = 0;
317+
};
302318
0E9139D70D10A8320067BAD6 /* Install highlight */ = {
303319
isa = PBXShellScriptBuildPhase;
304320
buildActionMask = 2147483647;

colorize.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ rsrcDir=$1
2525
target=$2
2626
thumb=$3
2727

28+
#echo target is $target
29+
2830
hlDir=$rsrcDir/highlight
2931
cmd=$hlDir/bin/highlight
3032
cmdOpts=(-I --font $font --quiet --add-data-dir $rsrcDir/override \

0 commit comments

Comments
 (0)