Skip to content

Commit af9aed3

Browse files
committed
fixed type on rename operation
1 parent 7b7390b commit af9aed3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/webdav/handlers/MOVE.handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class MOVERequestHandler implements WebDavMethodHandler {
5454
});
5555
await driveDatabaseManager.createFolder(folder, destinationResource.url);
5656
} else if (resource.type === 'file') {
57-
const newType = destinationResource.path.ext.trim().length > 0 ? destinationResource.path.ext : null;
57+
const newType = destinationResource.path.ext.replace('.', '');
5858
const file = originalDriveItem as DriveFileItem;
5959
await driveFileService.renameFile(file.uuid, {
6060
plainName: newName,

src/webdav/handlers/PUT.handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class PUTRequestHandler implements WebDavMethodHandler {
7878

7979
const file = await DriveFileService.instance.createFile({
8080
name: resource.path.name,
81-
type: resource.path.ext.replaceAll('.', ''),
81+
type: resource.path.ext.replace('.', ''),
8282
size: contentLength,
8383
folderId: parentFolderItem.id,
8484
fileId: uploadResult.fileId,

0 commit comments

Comments
 (0)