Revision: 2666
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2666&view=rev
Author:   hofman
Date:     2007-08-16 02:45:05 -0700 (Thu, 16 Aug 2007)

Log Message:
-----------
Set fileURL of downloaded document after the temporary file has been removed, 
so the document notes this.

Modified Paths:
--------------
    trunk/SKDownloadController.m

Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m        2007-08-15 19:01:43 UTC (rev 2665)
+++ trunk/SKDownloadController.m        2007-08-16 09:45:05 UTC (rev 2666)
@@ -182,14 +182,14 @@
         NSURL *URL = [NSURL fileURLWithPath:[download filePath]];
         NSError *error = nil;
         id document = [[NSDocumentController sharedDocumentController] 
openDocumentWithContentsOfURL:URL display:YES error:&error];
-        if (document)
-            [document setFileName:[[URL path] lastPathComponent]];
-        else
+        if (document == nil)
             [NSApp presentError:error];
         
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKAutoRemoveFinishedDownloadsKey]) {
             [download cleanupDownload];
             [downloads removeObject:download];
+            // for the document to note that the file has been deleted
+            [document setFileURL:[NSURL fileURLWithPath:[download filePath]]];
         }
     }
     


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to