mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
🎨 macOS 端对工作空间放置在 iCloud 路径下做检查 https://github.com/siyuan-note/siyuan/issues/7747
This commit is contained in:
parent
de929f2741
commit
c24da6c8a8
1 changed files with 6 additions and 0 deletions
|
|
@ -417,10 +417,16 @@
|
|||
|
||||
const walk = (dir, files = []) => {
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const dirFiles = fs.readdirSync(dir)
|
||||
for (const f of dirFiles) {
|
||||
const stat = fs.lstatSync(dir + path.sep + f)
|
||||
if (stat.isDirectory()) {
|
||||
// 如果已经遍历过则不再遍历
|
||||
if (files.includes(dir + path.sep + f)) {
|
||||
continue
|
||||
}
|
||||
|
||||
walk(dir + path.sep + f, files)
|
||||
} else {
|
||||
files.push(dir + path.sep + f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue