1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00

fix: Use move-file instead of rename

This commit is contained in:
Maksim Eltyshev 2022-08-26 16:02:47 +02:00
parent cee65ae7cb
commit e4258eda9b
3 changed files with 41 additions and 4 deletions

View file

@ -1,13 +1,11 @@
const fs = require('fs');
const path = require('path');
const util = require('util');
const rimraf = require('rimraf');
const moveFile = require('move-file');
const filenamify = require('filenamify');
const { v4: uuid } = require('uuid');
const sharp = require('sharp');
const rename = util.promisify(fs.rename);
module.exports = {
inputs: {
file: {
@ -26,7 +24,7 @@ module.exports = {
const filePath = path.join(rootPath, filename);
fs.mkdirSync(rootPath);
await rename(inputs.file.fd, filePath);
await moveFile(inputs.file.fd, filePath);
const image = sharp(filePath);
let metadata;