feat(server): restore modified at timestamp after upload, preserve when copying (#7010)
This commit is contained in:
@@ -12,7 +12,7 @@ import archiver from 'archiver';
|
||||
import chokidar, { WatchOptions } from 'chokidar';
|
||||
import { glob } from 'glob';
|
||||
import { constants, createReadStream, existsSync, mkdirSync } from 'node:fs';
|
||||
import fs, { copyFile, readdir, rename, writeFile } from 'node:fs/promises';
|
||||
import fs, { copyFile, readdir, rename, utimes, writeFile } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
export class FilesystemProvider implements IStorageRepository {
|
||||
@@ -56,6 +56,8 @@ export class FilesystemProvider implements IStorageRepository {
|
||||
|
||||
copyFile = copyFile;
|
||||
|
||||
utimes = utimes;
|
||||
|
||||
async checkFileExists(filepath: string, mode = constants.F_OK): Promise<boolean> {
|
||||
try {
|
||||
await fs.access(filepath, mode);
|
||||
|
||||
Reference in New Issue
Block a user