资源目录过长时,无法编译成功。适配超长资源路径

Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
fangyunzhong
2023-02-18 06:44:41 +00:00
parent 0e4321c9f9
commit 9dec3f6fe1
4 changed files with 43 additions and 23 deletions
+2 -6
View File
@@ -213,11 +213,7 @@ ResType ResourceUtil::GetResTypeFromString(const string &type)
bool ResourceUtil::CopyFleInner(const string &src, const string &dst)
{
if (!FileEntry::CopyFileInner(src, dst)) {
cerr << "Error: copy file fail from '" << src << "' to '" << dst << "'." << endl;
return false;
}
return true;
return FileEntry::CopyFileInner(src, dst);
}
bool ResourceUtil::CreateDirs(const string &filePath)
@@ -227,7 +223,7 @@ bool ResourceUtil::CreateDirs(const string &filePath)
}
if (!FileEntry::CreateDirs(filePath)) {
cerr << "Error: create dir fail '" << filePath << "'." << endl;
cerr << "Error: create dir '" << filePath << "' failed, reason:" << strerror(errno) << endl;
return false;
}
return true;