Skip to content

Commit

Permalink
set maxLength to 255
Browse files Browse the repository at this point in the history
fixes #84
  • Loading branch information
mifi committed Mar 17, 2024
1 parent 2bf3e77 commit a534fae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Expand Up @@ -69,7 +69,7 @@ module.exports = ({ sharedPath: sharedPathIn, port, maxUploadSize, zipCompressio

await pMap(files, async (file) => {
try {
const targetPath = join(sharedPath, filenamify(file.name));
const targetPath = join(sharedPath, filenamify(file.name, { maxLength: 255 }));
if (!(await fs.pathExists(targetPath))) await fs.rename(file.path, targetPath);
} catch (err) {
console.error(`Failed to rename ${file.name}`, err);
Expand Down

0 comments on commit a534fae

Please sign in to comment.