Skip to content

Commit

Permalink
[SSF] v1.1.2
Browse files Browse the repository at this point in the history
[Desc]
 - Share file, Exclude directory
  • Loading branch information
Kyusoo committed Apr 14, 2022
1 parent c2cdaa9 commit 87919f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# simple-sharing-file
Simple Sharing File

## Instruction
https://sundry-record.tistory.com/entry/App-Simple-Sharing-File
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-sharing-file",
"version": "1.1.1",
"version": "1.1.2",
"description": "Simple Sharing File",
"main": "dist/main.js",
"scripts": {
Expand Down
12 changes: 7 additions & 5 deletions src/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ class Server {
const fstat = fs.statSync(`${targetPath}/${file}`)
const sizeInfo = Util.calcFileSize(fstat.size)

fileArray.push({
name: file,
size: fstat.size,
sizeInfo,
})
if (fstat.isFile()) {
fileArray.push({
name: file,
size: fstat.size,
sizeInfo,
})
}
})

const files = fileArray.filter(fileInfo => ignoreList.includes(fileInfo.name) === false)
Expand Down

0 comments on commit 87919f5

Please sign in to comment.