Don’t re-use FSItems for expanded folders during reload

The problem is that the URL property for all descendents of this item are pointing to the old path.

Ideally we should recursively update the descendents, because the current workaround loses the expanded state of the folder.
This commit is contained in:
Allan Odgaard
2015-10-23 17:21:41 +07:00
parent 1cdf087e96
commit 9490ff8967

View File

@@ -210,6 +210,9 @@ struct tracking_t : fs::event_callback_t
FSFileItem* item;
auto it = existingItems.find(std::make_pair(fsItem.device, fsItem.inode));
if(it != existingItems.end() && fsItem.is_directory && ![it->second.url isEqual:url] && it->second.children)
it = existingItems.end();
if(it != existingItems.end())
{
item = it->second;