mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 14:41:50 +00:00
Add assert to check that the base path provided to FileUtils::makeAbsolute() is itself absolute.
This commit is contained in:
parent
483ad4cee0
commit
ea7fc49002
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "Platform.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
@ -449,6 +450,7 @@ std::string FileUtils::makeAbsolute(const char* path, const char* basePath)
|
|||
{
|
||||
if (isRelative(path))
|
||||
{
|
||||
assert(!isRelative(basePath));
|
||||
return std::string(basePath) + '/' + std::string(path);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue