summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/DriveService.ts
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2024-05-31 13:19:49 +0900
committerGitHub <noreply@github.com>2024-05-31 13:19:49 +0900
commitdfeaa1145b61dde4edeff452f5308e11a1ef19a2 (patch)
tree1dbdce2e26afd2cfd0cf1e97ac5a843446647626 /packages/backend/src/core/DriveService.ts
parentBump version to 2024.5.0-rc.7 (diff)
parentNew Crowdin updates (#13892) (diff)
downloadsharkey-dfeaa1145b61dde4edeff452f5308e11a1ef19a2.tar.gz
sharkey-dfeaa1145b61dde4edeff452f5308e11a1ef19a2.tar.bz2
sharkey-dfeaa1145b61dde4edeff452f5308e11a1ef19a2.zip
Merge branch 'develop' into release/2024.5.0
Diffstat (limited to 'packages/backend/src/core/DriveService.ts')
-rw-r--r--packages/backend/src/core/DriveService.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts
index 63fa26f69d..26cf532c70 100644
--- a/packages/backend/src/core/DriveService.ts
+++ b/packages/backend/src/core/DriveService.ts
@@ -497,20 +497,20 @@ export class DriveService {
if (user && !force) {
// Check if there is a file with the same hash
- const much = await this.driveFilesRepository.findOneBy({
+ const matched = await this.driveFilesRepository.findOneBy({
md5: info.md5,
userId: user.id,
});
- if (much) {
- this.registerLogger.info(`file with same hash is found: ${much.id}`);
- if (sensitive && !much.isSensitive) {
+ if (matched) {
+ this.registerLogger.info(`file with same hash is found: ${matched.id}`);
+ if (sensitive && !matched.isSensitive) {
// The file is federated as sensitive for this time, but was federated as non-sensitive before.
// Therefore, update the file to sensitive.
- await this.driveFilesRepository.update({ id: much.id }, { isSensitive: true });
- much.isSensitive = true;
+ await this.driveFilesRepository.update({ id: matched.id }, { isSensitive: true });
+ matched.isSensitive = true;
}
- return much;
+ return matched;
}
}