gAgent.set/getInventoryRootID() changed to gInventory.set/getRootFolderID()

This commit is contained in:
Shyotl
2011-10-12 02:29:12 -05:00
parent cfd154d46d
commit 36e0f667d5
22 changed files with 121 additions and 104 deletions

View File

@@ -196,7 +196,7 @@ void invrepair()
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
//ObjectContentNameMatches objectnamematches(ifolder);
gInventory.collectDescendents(gAgent.getInventoryRootID(),cats,items,FALSE);//,objectnamematches);
gInventory.collectDescendents(gInventory.getRootFolderID(),cats,items,FALSE);//,objectnamematches);
}

View File

@@ -835,15 +835,12 @@ private:
** Depreciated stuff. Move when ready.
**/
public:
const LLUUID& getInventoryRootID() const { return mInventoryRootID; }
void setInventoryRootID(const LLUUID &id) { mInventoryRootID = id; }
//What's this t-posed stuff from?
static BOOL isTPosed() { return mForceTPose; }
static void setTPosed(BOOL TPose) { mForceTPose = TPose; }
static void toggleTPosed();
private:
LLUUID mInventoryRootID;
static BOOL mForceTPose;

View File

@@ -276,8 +276,6 @@ LLTimer gLogoutTimer;
static const F32 LOGOUT_REQUEST_TIME = 6.f; // this will be cut short by the LogoutReply msg.
F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME;
LLUUID gInventoryLibraryOwner;
LLUUID gInventoryLibraryRoot;
// <edit>
LLUUID gSystemFolderRoot;
LLUUID gSystemFolderSettings;
@@ -4289,10 +4287,13 @@ void LLAppViewer::disconnectViewer()
if (!gNoRender)
{
// save inventory if appropriate
gInventory.cache(gAgent.getInventoryRootID(), gAgent.getID());
if(gInventoryLibraryRoot.notNull() && gInventoryLibraryOwner.notNull())
gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
if (gInventory.getLibraryRootFolderID().notNull()
&& gInventory.getLibraryOwnerID().notNull())
{
gInventory.cache(gInventoryLibraryRoot, gInventoryLibraryOwner);
gInventory.cache(
gInventory.getLibraryRootFolderID(),
gInventory.getLibraryOwnerID());
}
}

View File

@@ -158,6 +158,8 @@ public:
// *NOTE:Mani Fix this for login abstraction!!
void handleLoginComplete();
void purgeCache(); // Clear the local cache.
protected:
virtual bool initWindow(); // Initialize the viewer's window.
virtual bool initLogging(); // Initialize log files, logging system, return false on failure.
@@ -178,7 +180,6 @@ private:
bool initConfiguration(); // Initialize settings from the command line/config file.
bool initCache(); // Initialize local client cache.
void purgeCache(); // Clear the local cache.
// We have switched locations of both Mac and Windows cache, make sure
// files migrate and old cache is cleared out.
@@ -311,8 +312,6 @@ extern LLTimer gLogoutTimer;
extern F32 gSimLastTime;
extern F32 gSimFrames;
extern LLUUID gInventoryLibraryOwner;
extern LLUUID gInventoryLibraryRoot;
// <edit>
extern LLUUID gSystemFolderRoot;
extern LLUUID gSystemFolderSettings;

View File

@@ -192,7 +192,7 @@ BOOL LLFloaterLandmark::handleKeyHere(KEY key, MASK mask)
{
if (!root_folder->getCurSelectedItem())
{
LLFolderViewItem* itemp = root_folder->getItemByID(gAgent.getInventoryRootID());
LLFolderViewItem* itemp = root_folder->getItemByID(gInventory.getRootFolderID());
if (itemp)
{
root_folder->setSelection(itemp, FALSE, FALSE);

View File

@@ -154,7 +154,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
}
else
{
parent_category_id = gAgent.getInventoryRootID();
parent_category_id = gInventory.getRootFolderID();
}
LLUUID category_id = gInventory.createNewCategory(parent_category_id,
LLFolderType::FT_NONE,

View File

@@ -928,7 +928,7 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLIsType is_landmark(LLAssetType::AT_LANDMARK);
gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,

View File

@@ -736,11 +736,11 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
// *TODO: push this into listener and remove
// dependency on llagent
if(mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gAgent.getInventoryRootID()))
if(mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventory.getRootFolderID()))
{
src = LLToolDragAndDrop::SOURCE_AGENT;
}
else if (mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventoryLibraryRoot))
else if (mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventory.getLibraryRootFolderID()))
{
src = LLToolDragAndDrop::SOURCE_LIBRARY;
}
@@ -2793,7 +2793,7 @@ U32 LLFolderView::getSearchType() const
BOOL LLFolderView::addFolder( LLFolderViewFolder* folder)
{
// enforce sort order of My Inventory followed by Library
if (folder->getListener()->getUUID() == gInventoryLibraryRoot)
if (folder->getListener()->getUUID() == gInventory.getLibraryRootFolderID())
{
mFolders.push_back(folder);
}
@@ -3203,7 +3203,7 @@ void LLFolderView::sanitizeSelection()
else
{
// nothing selected to start with, so pick "My Inventory" as best guess
new_selection = getItemByID(gAgent.getInventoryRootID());
new_selection = getItemByID(gInventory.getRootFolderID());
}
if (new_selection)

View File

@@ -357,7 +357,7 @@ void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, std::string type,
}
else
{
category = model->createNewCategory(gAgent.getInventoryRootID(),
category = model->createNewCategory(gInventory.getRootFolderID(),
LLFolderType::FT_NONE, LLStringUtil::null);
}
model->notifyObservers();
@@ -679,7 +679,7 @@ class LLAttachObject : public inventory_panel_listener_t
}
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(id);
if(item && gInventory.isObjectDescendentOf(id, gAgent.getInventoryRootID()))
if(item && gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID()))
{
rez_attachment(item, attachmentp);
}

View File

@@ -320,7 +320,7 @@ BOOL LLInvFVBridge::isItemRemovable()
{
return TRUE;
}
if(model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID()))
if(model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
{
return TRUE;
}
@@ -937,8 +937,8 @@ BOOL LLInvFVBridge::isAgentInventory() const
{
const LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
if(gAgent.getInventoryRootID() == mUUID) return TRUE;
return model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID());
if(gInventory.getRootFolderID() == mUUID) return TRUE;
return model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID());
}
BOOL LLInvFVBridge::isCOFFolder() const
@@ -958,7 +958,7 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model,
BOOL restamp)
{
// <edit>
bool send_parent_update = gInventory.isObjectDescendentOf(item->getUUID(), gAgent.getInventoryRootID());
bool send_parent_update = gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getRootFolderID());
// </edit>
if(item->getParentUUID() != new_parent_id)
{
@@ -1635,11 +1635,11 @@ BOOL LLFolderBridge::isItemRemovable()
// <edit>
// People delete their inventory easily...
if(mUUID == gAgent.getInventoryRootID())
if(mUUID == gInventory.getRootFolderID())
{
return FALSE;
}
if(!model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID()))
if(!model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
{
return FALSE;
}
@@ -4035,7 +4035,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
LLUUID object_id = mUUID;
LLViewerInventoryItem* item;
item = (LLViewerInventoryItem*)gInventory.getItem(object_id);
if(item && gInventory.isObjectDescendentOf(object_id, gAgent.getInventoryRootID()))
if(item && gInventory.isObjectDescendentOf(object_id, gInventory.getRootFolderID()))
{
rez_attachment(item, NULL, replace);
}
@@ -4627,7 +4627,7 @@ void LLOutfitObserver::done()
}
if(pid.isNull())
{
pid = gAgent.getInventoryRootID();
pid = gInventory.getRootFolderID();
}
LLUUID cat_id = gInventory.createNewCategory(
@@ -4734,7 +4734,7 @@ void wear_outfit_by_name(const std::string& name)
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
LLNameCategoryCollector has_name(name);
gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH,

View File

@@ -432,29 +432,15 @@ void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id)
// not necessarily only for that type. *NOTE: This will create a new
// inventory category on the fly if one does not exist.
const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType preferred_type,
bool create_folder//,
/*bool find_in_library*/)
bool create_folder,
bool find_in_library)
{
LLUUID rv = findCatUUID(preferred_type);
if(rv.isNull() && isInventoryUsable() && create_folder)
{
LLUUID root_id = gAgent.getInventoryRootID();
if(root_id.notNull())
{
rv = createNewCategory(root_id, preferred_type, LLStringUtil::null);
}
}
return rv;
}
// Internal method which looks for a category with the specified
// preferred type. Returns LLUUID::null if not found.
LLUUID LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type)
{
const LLUUID &root_id = gAgent.getInventoryRootID();
LLUUID rv = LLUUID::null;
const LLUUID &root_id = (find_in_library) ? gInventory.getLibraryRootFolderID() : gInventory.getRootFolderID();
if(LLFolderType::FT_ROOT_INVENTORY == preferred_type)
{
return root_id;
rv = root_id;
}
else if (root_id.notNull())
{
@@ -467,17 +453,26 @@ LLUUID LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type)
{
if(cats->get(i)->getPreferredType() == preferred_type)
{
return cats->get(i)->getUUID();
rv = cats->get(i)->getUUID();
break;
}
}
}
}
return LLUUID::null;
if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library))
{
if(root_id.notNull())
{
return createNewCategory(root_id, preferred_type, LLStringUtil::null);
}
}
return rv;
}
LLUUID LLInventoryModel::findCategoryByName(std::string name)
{
LLUUID root_id = gAgent.getInventoryRootID();
LLUUID root_id = gInventory.getRootFolderID();
if(root_id.notNull())
{
cat_array_t* cats = NULL;
@@ -674,7 +669,7 @@ void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask)
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
LLLinkedItemIDMatches is_linked_item_match(object_id);
collectDescendentsIf(gAgent.getInventoryRootID(),
collectDescendentsIf(gInventory.getRootFolderID(),
cat_array,
item_array,
LLInventoryModel::INCLUDE_TRASH,
@@ -724,7 +719,7 @@ LLInventoryModel::item_array_t LLInventoryModel::collectLinkedItems(const LLUUID
item_array_t items;
LLInventoryModel::cat_array_t cat_array;
LLLinkedItemIDMatches is_linked_item_match(id);
collectDescendentsIf((start_folder_id == LLUUID::null ? gAgent.getInventoryRootID() : start_folder_id),
collectDescendentsIf((start_folder_id == LLUUID::null ? gInventory.getRootFolderID() : start_folder_id),
cat_array,
items,
LLInventoryModel::INCLUDE_TRASH,
@@ -756,7 +751,7 @@ void LLInventoryModel::appendPath(const LLUUID& id, std::string& path)
bool LLInventoryModel::isInventoryUsable() const
{
bool result = false;
if(gAgent.getInventoryRootID().notNull() && mIsAgentInvUsable)
if(gInventory.getRootFolderID().notNull() && mIsAgentInvUsable)
{
result = true;
}
@@ -1768,8 +1763,8 @@ void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id)
if (!sFullFetchStarted)
{
sFullFetchStarted = TRUE;
sFetchQueue.push_back(gInventoryLibraryRoot);
sFetchQueue.push_back(gAgent.getInventoryRootID());
sFetchQueue.push_back(gInventory.getLibraryRootFolderID());
sFetchQueue.push_back(gInventory.getRootFolderID());
if (!sBackgroundFetchActive)
{
sBackgroundFetchActive = TRUE;
@@ -2584,7 +2579,7 @@ void LLInventoryModel::buildParentChildMap()
else
{
// it's a protected folder.
cat->setParent(gAgent.getInventoryRootID());
cat->setParent(gInventory.getRootFolderID());
}
cat->updateServer(TRUE);
catsp = getUnlockedCatArray(cat->getParentUUID());
@@ -2684,7 +2679,7 @@ void LLInventoryModel::buildParentChildMap()
}
}
const LLUUID& agent_inv_root_id = gAgent.getInventoryRootID();
const LLUUID& agent_inv_root_id = gInventory.getRootFolderID();
if (agent_inv_root_id.notNull())
{
cat_array_t* catsp = get_ptr_in_map(mParentChildCategoryTree, agent_inv_root_id);
@@ -3553,6 +3548,36 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
}
}
const LLUUID &LLInventoryModel::getRootFolderID() const
{
return mRootFolderID;
}
void LLInventoryModel::setRootFolderID(const LLUUID& val)
{
mRootFolderID = val;
}
const LLUUID &LLInventoryModel::getLibraryRootFolderID() const
{
return mLibraryRootFolderID;
}
void LLInventoryModel::setLibraryRootFolderID(const LLUUID& val)
{
mLibraryRootFolderID = val;
}
const LLUUID &LLInventoryModel::getLibraryOwnerID() const
{
return mLibraryOwnerID;
}
void LLInventoryModel::setLibraryOwnerID(const LLUUID& val)
{
mLibraryOwnerID = val;
}
// *NOTE: DEBUG functionality
void LLInventoryModel::dumpInventory() const
{

View File

@@ -146,6 +146,23 @@ public:
private:
bool mIsAgentInvUsable; // used to handle an invalid inventory state
//--------------------------------------------------------------------
// Root Folders
//--------------------------------------------------------------------
public:
// The following are set during login with data from the server
void setRootFolderID(const LLUUID& id);
void setLibraryOwnerID(const LLUUID& id);
void setLibraryRootFolderID(const LLUUID& id);
const LLUUID &getRootFolderID() const;
const LLUUID &getLibraryOwnerID() const;
const LLUUID &getLibraryRootFolderID() const;
private:
LLUUID mRootFolderID;
LLUUID mLibraryRootFolderID;
LLUUID mLibraryOwnerID;
//--------------------------------------------------------------------
// Structure
//--------------------------------------------------------------------
@@ -246,8 +263,8 @@ public:
// on the fly if one does not exist. *NOTE: if find_in_library is true it
// will search in the user's library folder instead of "My Inventory"
const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type,
bool create_folder = true
/*,bool find_in_library = false*/);
bool create_folder = true,
bool find_in_library = false);
// Get whatever special folder this object is a child of, if any.
const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const;
@@ -490,28 +507,6 @@ public:
static bool isEverythingFetched();
static void backgroundFetch(void*); // background fetch idle function
static void incrBulkFetch(S16 fetching) { sBulkFetchCount+=fetching; if (sBulkFetchCount<0) sBulkFetchCount=0; }
protected:
// Internal methods which add inventory and make sure that all of
// the internal data structures are consistent. These methods
// should be passed pointers of newly created objects, and the
// instance will take over the memory management from there.
// <edit>
// Internal method which looks for a category with the specified
// preferred type. Returns LLUUID::null if not found
LLUUID findCatUUID(LLFolderType::EType preferred_type);
// Empty the entire contents
// Given the current state of the inventory items, figure out the
// clone information. *FIX: This is sub-optimal, since we can
// insert this information snurgically, but this makes sure the
// implementation works before we worry about optimization.
//void recalculateCloneInformation();
// file import/export.
// <edit>
/** Notifications
** **
*******************************************************************************/

View File

@@ -612,7 +612,7 @@ void LLPreviewGesture::addAnimations()
PERM_ITEM_UNRESTRICTED,
gAgent.getID(),
gAgent.getGroupID());
gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
@@ -657,7 +657,7 @@ void LLPreviewGesture::addSounds()
PERM_ITEM_UNRESTRICTED,
gAgent.getID(),
gAgent.getGroupID());
gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,

View File

@@ -1264,7 +1264,7 @@ void LLPreviewLSL::loadAsset()
const LLInventoryItem* item = gInventory.getItem(mItemUUID);
BOOL is_library = item
&& !gInventory.isObjectDescendentOf(mItemUUID,
gAgent.getInventoryRootID());
gInventory.getRootFolderID());
if(!item)
{
// do the more generic search.

View File

@@ -1716,8 +1716,8 @@ bool idle_startup()
it = options[0].find("folder_id");
if(it != options[0].end())
{
gAgent.setInventoryRootID(LLUUID((*it).second));
//gInventory.mock(gAgent.getInventoryRootID());
gInventory.setRootFolderID(LLUUID((*it).second));
//gInventory.mock(gInventory.getRootFolderID());
}
}
@@ -2318,7 +2318,7 @@ bool idle_startup()
it = options[0].find("folder_id");
if(it != options[0].end())
{
gInventoryLibraryRoot.set((*it).second);
gInventory.setLibraryRootFolderID(LLUUID((*it).second));
}
}
options.clear();
@@ -2330,14 +2330,14 @@ bool idle_startup()
it = options[0].find("agent_id");
if(it != options[0].end())
{
gInventoryLibraryOwner.set((*it).second);
gInventory.setLibraryOwnerID(LLUUID((*it).second));
}
}
options.clear();
if(LLUserAuth::getInstance()->getOptions("inventory-skel-lib", options)
&& gInventoryLibraryOwner.notNull())
&& gInventory.getLibraryOwnerID().notNull())
{
if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
if(!gInventory.loadSkeleton(options, gInventory.getLibraryOwnerID()))
{
LL_WARNS("AppInit") << "Problem loading inventory-skel-lib" << LL_ENDL;
}

View File

@@ -473,7 +473,7 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
{
if (!root_folder->getCurSelectedItem())
{
LLFolderViewItem* itemp = root_folder->getItemByID(gAgent.getInventoryRootID());
LLFolderViewItem* itemp = root_folder->getItemByID(gInventory.getRootFolderID());
if (itemp)
{
root_folder->setSelection(itemp, FALSE, FALSE);

View File

@@ -4841,7 +4841,7 @@ void handle_take()
}
// check library
if(gInventory.isObjectDescendentOf(category_id, gInventoryLibraryRoot))
if(gInventory.isObjectDescendentOf(category_id, gInventory.getLibraryRootFolderID()))
{
category_id.setNull();
}

View File

@@ -5975,7 +5975,7 @@ void container_inventory_arrived(LLViewerObject* object,
{
// create a new inventory category to put this in
LLUUID cat_id;
cat_id = gInventory.createNewCategory(gAgent.getInventoryRootID(),
cat_id = gInventory.createNewCategory(gInventory.getRootFolderID(),
LLFolderType::FT_NONE,
std::string("Acquired Items")); //TODO: Translate

View File

@@ -624,7 +624,7 @@ bool RlvForceWear::isStrippable(const LLInventoryItem* pItem)
}
LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID());
while ( (pFolder) && (gAgent.getInventoryRootID() != pFolder->getParentUUID()) )
while ( (pFolder) && (gInventory.getRootFolderID() != pFolder->getParentUUID()) )
{
if (std::string::npos != pFolder->getName().find(RLV_FOLDER_FLAG_NOSTRIP))
return false;

View File

@@ -232,7 +232,7 @@ LLViewerInventoryCategory* RlvInventory::getSharedRoot() const
if (gInventory.isInventoryUsable())
{
LLInventoryModel::cat_array_t* pFolders; LLInventoryModel::item_array_t* pItems;
gInventory.getDirectDescendentsOf(gAgent.getInventoryRootID(), pFolders, pItems);
gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), pFolders, pItems);
if (pFolders)
{
// NOTE: we might have multiple #RLV folders so we'll just go with the first one we come across
@@ -308,7 +308,7 @@ std::string RlvInventory::getSharedPath(const LLViewerInventoryCategory* pFolder
return std::string();
const LLUUID& idRLV = pRlvRoot->getUUID();
const LLUUID& idRoot = gAgent.getInventoryRootID();
const LLUUID& idRoot = gInventory.getRootFolderID();
std::string strPath;
// Walk up the tree until we reach the top
@@ -617,7 +617,7 @@ RlvForceWear::EWearAction RlvWearableItemCollector::getWearAction(const LLUUID&
while ((itCurFolder = m_WearActionMap.find(idCurFolder)) == m_WearActionMap.end())
{
const LLViewerInventoryCategory* pFolder = gInventory.getCategory(idCurFolder);
if ((!pFolder) || (gAgent.getInventoryRootID() == pFolder->getParentUUID()))
if ((!pFolder) || (gInventory.getRootFolderID() == pFolder->getParentUUID()))
break;
idCurFolder = pFolder->getParentUUID();
}

View File

@@ -67,7 +67,7 @@ AIInventoryFetchDescendentsObserver::AIInventoryFetchDescendentsObserver(AIState
void AIFetchInventoryFolder::fetch(std::string const& foldername, bool create, bool fetch_contents)
{
fetch(gAgent.getInventoryRootID(), foldername, create, fetch_contents);
fetch(gInventory.getRootFolderID(), foldername, create, fetch_contents);
}
char const* AIFetchInventoryFolder::state_str_impl(state_type run_state) const
@@ -103,7 +103,7 @@ void AIFetchInventoryFolder::multiplex_impl(void)
// If LLInventoryModel_mIsAgentInvUsable_true then this should be and stay true forever.
llassert(gInventory.isInventoryUsable());
if (mParentFolder.isNull())
mParentFolder = gAgent.getInventoryRootID();
mParentFolder = gInventory.getRootFolderID();
if (mFolderUUID.isNull() || !gInventory.getCategory(mFolderUUID)) // Is the UUID unknown, or doesn't exist?
{
// Set this to null here in case we abort.
@@ -116,7 +116,7 @@ void AIFetchInventoryFolder::multiplex_impl(void)
break;
}
// Check if the parent exists.
if (mParentFolder != gAgent.getInventoryRootID() && !gInventory.getCategory(mParentFolder))
if (mParentFolder != gInventory.getRootFolderID() && !gInventory.getCategory(mParentFolder))
{
llwarns << "Unknown parent folder ID " << mParentFolder << llendl;
abort();

View File

@@ -71,7 +71,7 @@ class AIFetchInventoryFolder : public AIStateMachine {
* is set, you will also be able to scan over the contents of the folder
* upon successful finish.
*
* @param parentUUID The UUID of the parent. Passing gAgent.getInventoryRootID(), or a null ID, will assume a root folder.
* @param parentUUID The UUID of the parent. Passing gInventory.getRootFolderID(), or a null ID, will assume a root folder.
* @param foldername The name of the folder.
* @param create if set, create the folder if it doesn't exists yet.
* @param fetch_contents if set, fetch the contents before finishing.