fix: use posix paths when converting paths to relative format
This commit is contained in:
parent
474102aa14
commit
c669babb2f
@ -143,7 +143,7 @@ export class FileManager {
|
|||||||
// Reload file list from the container to include template files
|
// Reload file list from the container to include template files
|
||||||
const result = await this.sandbox.commands.run(`find "${this.dirName}" -type f`); // List all files recursively
|
const result = await this.sandbox.commands.run(`find "${this.dirName}" -type f`); // List all files recursively
|
||||||
const localPaths = result.stdout.split('\n').filter(path => path); // Split the output into an array and filter out empty strings
|
const localPaths = result.stdout.split('\n').filter(path => path); // Split the output into an array and filter out empty strings
|
||||||
const relativePaths = localPaths.map(filePath => path.relative(this.dirName, filePath)); // Convert absolute paths to relative paths
|
const relativePaths = localPaths.map(filePath => path.posix.relative(this.dirName, filePath)); // Convert absolute paths to relative paths
|
||||||
this.files = generateFileStructure(relativePaths);
|
this.files = generateFileStructure(relativePaths);
|
||||||
|
|
||||||
// Make the logged in user the owner of all project files
|
// Make the logged in user the owner of all project files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user