Skip to content

Commit

Permalink
path osx
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Jun 3, 2024
1 parent 29e173b commit 6a71179
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/utils/projects_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,20 @@ class ProjectsUtil extends SharedProjectsUtil
const projectDir = settings.getCurrentProjectDir();
const assetPorts = this.getProjectAssetPorts(project, includeLibraryAssets);
let urls = assetPorts.map((assetPort) => { return assetPort.value; });
urls.forEach((url) =>
urls.forEach((fullPath) =>
{
if (url.startsWith("/assets/")) url = "." + url;
if (fullPath.startsWith("/assets/")) fullPath = "." + fullPath;

if (url.startsWith("./"))
if (fullPath.startsWith("./"))
{
url = path.join(projectDir, url);
fullPath = path.join(projectDir, fullPath);
}
else
else if (fullPath.startsWith("file:"))
{
url = fileURLToPath(url);
fullPath = decodeURI(fullPath);
fullPath = fileURLToPath(fullPath);
}


let fullPath = url;
if (fs.existsSync(fullPath))
{
fileNames.push(fullPath);
Expand Down

0 comments on commit 6a71179

Please sign in to comment.