sdk idl工具读取文件失败的问题修复

Signed-off-by: zhangjidong <873721519@qq.com>
This commit is contained in:
zhangjidong 2024-06-29 16:54:42 +08:00
parent 274b1f7596
commit 3c36e83379
2 changed files with 5 additions and 1 deletions

View File

@ -93,7 +93,7 @@ static int DoCompile(Options& options, std::shared_ptr<MetaComponent>& metadata)
return 0;
}
static int DoGenerage(Options& options, std::shared_ptr<MetaComponent>& metadata)
static int DoGenerage(const Options& options, std::shared_ptr<MetaComponent>& metadata)
{
if (options.DoGenerateCode()) {
if (metadata == nullptr) {

View File

@ -41,11 +41,15 @@ File::File(const String& path, int mode)
if (absolutePath != nullptr) {
pathTmp = absolutePath;
free(absolutePath);
} else {
pathTmp = path;
}
#else
char absolutePath[_MAX_PATH];
if (_fullpath(absolutePath, path.string(), _MAX_PATH) == nullptr) {
pathTmp = absolutePath;
} else {
pathTmp = path;
}
#endif