Revision: 7455
http://skim-app.svn.sourceforge.net/skim-app/?rev=7455&view=rev
Author: hofman
Date: 2011-08-29 14:33:47 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
only use downloads directory when it exists
Modified Paths:
--------------
trunk/SKDownload.m
Modified: trunk/SKDownload.m
===================================================================
--- trunk/SKDownload.m 2011-08-29 12:38:11 UTC (rev 7454)
+++ trunk/SKDownload.m 2011-08-29 14:33:47 UTC (rev 7455)
@@ -356,7 +356,8 @@
- (void)download:(NSURLDownload *)download
decideDestinationWithSuggestedFilename:(NSString *)filename {
NSString *downloadDir = [[[NSUserDefaults standardUserDefaults]
stringForKey:SKDownloadsDirectoryKey] stringByExpandingTildeInPath];
- if (downloadDir)
+ BOOL isDir;
+ if ([[NSFileManager defaultManager] fileExistsAtPath:downloadDir
isDirectory:&isDir] && isDir)
[URLDownload setDestination:[downloadDir
stringByAppendingPathComponent:filename] allowOverwrite:NO];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit