From 9b6974bf3183eb08b7713e7e502ebdfa0110e072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Walsh?= Date: Mon, 18 Aug 2008 22:47:48 +0100 Subject: [PATCH] Prevent confusing filenames when quick-looking files. Instead of creating a file with a random prefix, create a file with the same name in a temporary directory name. This way the quicklook window shows the correct filename. --- PBGitTree.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBGitTree.m b/PBGitTree.m index 790e77f..59a2659 100644 --- a/PBGitTree.m +++ b/PBGitTree.m @@ -124,7 +124,7 @@ return localFileName; if (!localFileName) - localFileName = [PBEasyFS tmpNameWithSuffix: path]; + localFileName = [[PBEasyFS tmpDirWithPrefix: sha] stringByAppendingPathComponent:path]; NSFileHandle* handle = [repository handleForArguments:[NSArray arrayWithObjects:@"show", [self refSpec], nil]]; NSData* data = [handle readDataToEndOfFile];