Skip to content

Commit

Permalink
disallow files starting with . or # in container listings
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-zucker committed Feb 26, 2024
1 parent e42ab4c commit c59a860
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions file/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export class SolidRestFile {
try {
files = await fs.readdirSync(pathname);
for (var f in files) {
if(files[f].startsWith('.')) continue;
if(files[f].startsWith('#')) continue;
console.log(files[f]);
if(!pathname.endsWith('/')) pathname = pathname + "/";
newFiles.push(await this.getItemInfo(pathname + files[f]));
}
Expand Down

0 comments on commit c59a860

Please sign in to comment.