From 511cc0d4031024b45c1eb97ae6971217f2ef5994 Mon Sep 17 00:00:00 2001 From: "feldstein@chromium.org" Date: Fri, 2 Apr 2010 19:35:05 +0000 Subject: Fix copying/dragging of empty folders in BMM on mac The code was assuming there was at least one url. There is still a js error in the BMM on all platforms that I've run into a couple of times, but I want to check this in while I look into that. BUG=39229 TEST=Copy or drag an empty bookmarks folder Review URL: http://codereview.chromium.org/1456003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43510 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome/browser/bookmarks') diff --git a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm index 4d3416f..dd8f938 100644 --- a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm +++ b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm @@ -201,6 +201,10 @@ void WriteSimplifiedBookmarkTypes(NSPasteboard* pb, NSMutableArray* urls = [NSMutableArray array]; FillFlattenedArraysForBookmarks(elements, titles, urls); + // These bookmark types only act on urls, not folders. + if ([urls count] < 1) + return; + // Write WebURLsWithTitlesPboardType. [pb setPropertyList:[NSArray arrayWithObjects:urls, titles, nil] forType:kWebURLsWithTitlesPboardType]; -- cgit v1.1