Changeset 912

Show
Ignore:
Timestamp:
05/27/08 14:44:13
Author:
robert
Message:

From Christophe Loustaunau, "I have test vpbmaster on windows 2000, and I think that I have have an error :

If vpb have to create a directory like : "c:\data\mars" it fails. In fact when vpb have to do that, it check all the directory possible like this :
"c:"
"c:\data"
"c:\data\mars"

But when vpb want's to know if "c:" exist with osgDB::FileType? type = osgDB::fileType(path) It fails,
It's because "c:" doesn't exist but "c:\" does.

So here is a patch based on the svn, which correct that."

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vpb/FileUtils.cpp

    r903 r912  
    9191            if (size>1) 
    9292            { 
    93                 directories.push_back(std::string(fullpath,0, pos_current)); 
     93                if (pos_current == 2 && fullpath[1]==':') 
     94                    directories.push_back(std::string(fullpath,0, pos_current+1)); 
     95                else 
     96                    directories.push_back(std::string(fullpath,0, pos_current)); 
     97                pos_start = pos_current+1; 
    9498            } 
    95             pos_start = pos_current+1; 
    9699        } 
    97100    }