Skip to content

Commit

Permalink
Update FileSystemSelector.js
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed May 17, 2024
1 parent de5d8a9 commit b157877
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/renderer/src/stories/FileSystemSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,6 @@ export class FilesystemSelector extends LitElement {
const isLikelyFile = fs ? fs.statSync(value).isFile() : value.split(".").length;
if ((this.type === "directory" && isLikelyFile) || (this.type === "file" && !isLikelyFile))
this.#onThrow("Incorrect filesystem object", `Please provide a <b>${this.type}</b> instead.`);

// if (this.accept) {
// const ext = value.split(".").pop();
// const noDot = this.accept.map(ext => ext[0] === "." ? ext.slice(1) : ext)
// if (!noDot.includes(ext))
// this.#onThrow(
// "Incorrect file extension",
// `Please provide a file with the extension <b>${this.accept.join(", ")}</b> instead.`
// );
// }
};

#handleFiles = async (pathOrPaths, type) => {
Expand Down

0 comments on commit b157877

Please sign in to comment.