Makes an absolute path from a relative path and a base path */
| 190 | |
| 191 | /** Makes an absolute path from a relative path and a base path */ |
| 192 | std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath ) |
| 193 | { |
| 194 | if( Path_IsAbsolute( sRelativePath ) ) |
| 195 | return sRelativePath; |
| 196 | else |
| 197 | { |
| 198 | if( !Path_IsAbsolute( sBasePath ) ) |
| 199 | return ""; |
| 200 | |
| 201 | std::string sCompacted = Path_Compact( Path_Join( sBasePath, sRelativePath ) ); |
| 202 | if( Path_IsAbsolute( sCompacted ) ) |
| 203 | return sCompacted; |
| 204 | else |
| 205 | return ""; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | |
| 210 | /** Fixes the directory separators for the current platform */ |
no test coverage detected