From 01a72afe0aca05474e763f1bb25c9dc20c172f62 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 20 Feb 2009 16:27:57 +0000 Subject: [PATCH] From Mathieu Marache, "I was trying to use the archive output of osgdem without success when I eventually found out that it was now disabled (the mailing list archive tells me it is because of multithreaded write issues with vpn). I then decided to use osgarchive to make it myself from the generated output. However if one of the insert parameters is a directory, it won't be able to find them. The attached versions corrects this." --- applications/osgarchive/osgarchive.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/applications/osgarchive/osgarchive.cpp b/applications/osgarchive/osgarchive.cpp index bc61cf473..e8722c0ab 100644 --- a/applications/osgarchive/osgarchive.cpp +++ b/applications/osgarchive/osgarchive.cpp @@ -79,7 +79,12 @@ int main( int argc, char **argv ) else if (fileType==osgDB::DIRECTORY) { osgDB::DirectoryContents directory = osgDB::getDirectoryContents(arguments[pos]); - files.insert(files.end(),directory.begin(),directory.end()); + osgDB::DirectoryContents::iterator it = directory.begin(); + while( it != directory.end()) + { + files.push_back(filePath + "/" + (*it)); + ++it; + } } } else