Skip to content

Commit

Permalink
fix: getFileId uses pathname as id
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jun 16, 2024
1 parent d419dc3 commit be330a5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,11 @@ async function getDirectoryHandles(handle, name) {

async function getFileId(file) {

if (file.id = file.path || file.webkitRelativePath) {
if (file.id = file.pathname) {
return file.id;
} else {
const { name, size, type, lastModified } = file;
const key = `${name}${size}${type}${lastModified}`;

file.id = key
return key;
file.id = `${file.name}${file.size}${file.type}${file.lastModified}`;
return file.id;
}
}

Expand Down

0 comments on commit be330a5

Please sign in to comment.