MCPcopy Create free account
hub / github.com/VemtoOrg/vemto2 / fixPermissions

Method fixPermissions

src/main/base/FileSystem.ts:324–350  ·  view source on GitHub ↗
(folderPath: string)

Source from the content-addressed store, hash-verified

322 }
323
324 fixPermissions(folderPath: string): FileSystem {
325 console.log('Fixing Permissions: ' + folderPath)
326
327 const excludedPaths = [
328 '.git',
329 'vendor',
330 'node_modules',
331 ]
332
333 if(excludedPaths.some(p => folderPath.includes(p))) {
334 return this
335 }
336
337 fs.chmodSync(folderPath, 0o755)
338
339 fs.readdirSync(folderPath).forEach((file) => {
340 const curPath = path.join(folderPath, file)
341
342 if (fs.lstatSync(curPath).isDirectory()) {
343 this.fixPermissions(curPath)
344 } else {
345 fs.chmodSync(curPath, 0o644)
346 }
347 })
348
349 return this
350 }
351
352}
353

Callers 3

copyFolderMethod · 0.95
HandleIpcMessagesFunction · 0.80

Calls 2

joinMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected