This commit is contained in:
24kycj
2024-12-02 13:42:37 +08:00
parent cdc56d6c71
commit 1dba691ab9
4 changed files with 27 additions and 25 deletions
+10 -4
View File
@@ -142,10 +142,16 @@ export default {
const _this = this;
dialog
.showOpenDialog({
properties: ["openFile", "multiSelections"],
properties: ["multiSelections"],
})
.then(async (res) => {
for (const item of res.filePaths) {
.then(async (rel) => {
console.log(rel);
for (const item of rel.filePaths) {
const stats = fs.statSync(item);
let folder = false
if (stats.isDirectory()) {
folder = true
}
await fs.stat(item, function (err, res) {
if (err) {
return false;
@@ -154,7 +160,7 @@ export default {
name: getFileName(item),
path: item,
size: res.size,
folder: false,
folder: folder,
});
});
}