Unverified Commit a98aa0db authored by Aral Balkan's avatar Aral Balkan
Browse files

Actually fixed the showing of received attachment links in Finder (for both...

Actually fixed the showing of received attachment links in Finder (for both All Friends and conversations timelines). Closes #185.
parent 2323f6f3
......@@ -469,10 +469,27 @@ class TimelineViewController: NSViewController, WKNavigationDelegate
// It’s a different person
let rootPath = NSHomeDirectory().stringByAppendingPathComponent("/Pulse/Sync/2. Specific friends/\(theCommand)/")
let filePath = (rootPath as NSString).stringByAppendingPathComponent("from/\(downloadFolder)/\(downloadFileName)")
var rootPath:String
if downloadTimeline == "all-friends"
rootPath = NSHomeDirectory().stringByAppendingPathComponent("/Pulse/Sync/3. All your friends/from/\(theCommand)/")
else if downloadTimeline == "specific-friends"
rootPath = NSHomeDirectory().stringByAppendingPathComponent("/Pulse/Sync/2. Specific friends/\(theCommand)/from/")
// Unexpected downloadTimeline
rootPath = "error"
println("Warning: could not display download link for \(downloadTimeline). Not implemented.")
let filePath = (rootPath as NSString).stringByAppendingPathComponent("\(downloadFolder)/\(downloadFileName)")
println("About to show attachment at path: \(filePath)")
// println("About to show attachment at path: \(filePath)")
NSWorkspace.sharedWorkspace().selectFile(filePath, inFileViewerRootedAtPath: rootPath)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment