Revision: 27369 http://sourceforge.net/p/bibdesk/svn/27369 Author: hofman Date: 2022-04-14 16:37:26 +0000 (Thu, 14 Apr 2022) Log Message: ----------- clean up tyemporary directory for preview async, because creating NSAttributedString from html can be async, apparently
Modified Paths: -------------- trunk/bibdesk/BibDocument_UI.m Modified: trunk/bibdesk/BibDocument_UI.m =================================================================== --- trunk/bibdesk/BibDocument_UI.m 2022-04-14 06:30:19 UTC (rev 27368) +++ trunk/bibdesk/BibDocument_UI.m 2022-04-14 16:37:26 UTC (rev 27369) @@ -183,7 +183,7 @@ NSURL *tmpFileURL = [fm uniqueFileURLWithName:[@"templatepreview" stringByAppendingPathExtension:[template fileExtension]] atURL:tmpDirURL isDirectory:NO]; [str writeToURL:tmpFileURL atomically:NO encoding:NSUTF8StringEncoding error:NULL]; templateString = [[[NSAttributedString alloc] initWithURL:tmpFileURL options:[NSDictionary dictionary] documentAttributes:nil error:NULL] autorelease]; - [fm cleanupTemporaryDirectoryAtURL:tmpDirURL]; + dispatch_async(dispatch_get_main_queue(), ^{ [fm cleanupTemporaryDirectoryAtURL:tmpDirURL]; }); } else if ([template templateFormat] == BDSKTemplateFormatPlainHTML) templateString = [[[NSAttributedString alloc] initWithHTML:[str dataUsingEncoding:NSUTF8StringEncoding] documentAttributes:NULL] autorelease]; else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit