Changeset 861
- Timestamp:
- 01/26/08 13:36:40
- Files:
-
- trunk/src/vpb/Destination.cpp (modified) (2 diffs)
- trunk/src/vpb/FileUtils.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vpb/Destination.cpp
r859 r861 2710 2710 { 2711 2711 std::string filename = _name+"_subtile"+_dataSet->getDestinationTileExtension(); 2712 log(osg:: NOTICE,"CompositeDestination::getSubTileName()=%s",filename.c_str());2712 log(osg::INFO,"CompositeDestination::getSubTileName()=%s",filename.c_str()); 2713 2713 return filename; 2714 2714 } … … 2726 2726 { 2727 2727 filename = _dataSet->getTaskName(_level,_tileX,_tileY) + std::string("/") + _name+"_subtile"+_dataSet->getDestinationTileExtension(); 2728 log(osg:: NOTICE,"CompositeDestination::getExternalSubTileName()=%s ROOT!!",filename.c_str());2728 log(osg::INFO,"CompositeDestination::getExternalSubTileName()=%s ROOT!!",filename.c_str()); 2729 2729 } 2730 2730 else if (externalFile && isLeaf) 2731 2731 { 2732 2732 filename = std::string("../") + _dataSet->getTaskName(_level,_tileX,_tileY) + std::string("/") + _name+"_subtile"+_dataSet->getDestinationTileExtension(); 2733 log(osg:: NOTICE,"CompositeDestination::getExternalSubTileName()=%s LEAF!!",filename.c_str());2733 log(osg::INFO,"CompositeDestination::getExternalSubTileName()=%s LEAF!!",filename.c_str()); 2734 2734 } 2735 2735 else 2736 2736 { 2737 2737 filename = _name+"_subtile"+_dataSet->getDestinationTileExtension(); 2738 log(osg:: NOTICE,"CompositeDestination::getExternalSubTileName()=%s",filename.c_str());2738 log(osg::INFO,"CompositeDestination::getExternalSubTileName()=%s",filename.c_str()); 2739 2739 } 2740 2740 trunk/src/vpb/FileUtils.cpp
r860 r861 70 70 if (path==0) return 0; 71 71 72 vpb::log(osg::NOTICE,"mkpath(%s)",path); 73 74 // first create a list of paths that needs to be checked/created. 72 75 std::string fullpath(path); 73 76 typedef std::list<std::string> Directories; … … 92 95 } 93 96 94 vpb::log(osg::NOTICE,"mkpath(%s)",path);97 // now check the diretories and create the onces that are required in turn. 95 98 for(Directories::iterator itr = directories.begin(); 96 99 itr != directories.end(); 97 100 ++itr) 98 101 { 99 vpb::log(osg::NOTICE," directory %s",(*itr).c_str()); 100 102 std::string& path = (*itr); 101 103 int result = 0; 102 osgDB::FileType type = osgDB::fileType( (*itr));103 if (type==osgDB:: DIRECTORY)104 osgDB::FileType type = osgDB::fileType(path); 105 if (type==osgDB::REGULAR_FILE) 104 106 { 105 log(osg::NOTICE," Base Directory already created"); 106 } 107 else if (type==osgDB::REGULAR_FILE) 108 { 109 log(osg::NOTICE," Error cannot create directory as a conventional file already exists with that name"); 107 log(osg::NOTICE,"Error cannot create directory %s as a conventional file already exists with that name",path.c_str()); 110 108 return 1; 111 109 } 112 else // FILE_NOT_FOUND110 else if (type==osgDB::FILE_NOT_FOUND) 113 111 { 114 112 // need to create directory. 115 result = vpb::mkdir((*itr).c_str(), mode); 113 result = vpb::mkdir(path.c_str(), mode); 114 if (result) log(osg::NOTICE,"Error could not create directory %s",path.c_str()); 115 else log(osg::NOTICE," created directory %s",path.c_str()); 116 116 117 if (result) return result; 117 118 }
