From cd4b2a6810849c0b0189026492e5ab50b503403c Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 16 Apr 2024 15:26:35 +0530 Subject: [PATCH] Inline --- web/apps/photos/src/services/watchFolder/utils.ts | 5 ----- .../photos/src/services/watchFolder/watchFolderService.ts | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/apps/photos/src/services/watchFolder/utils.ts b/web/apps/photos/src/services/watchFolder/utils.ts index bd6ceb853..e69de29bb 100644 --- a/web/apps/photos/src/services/watchFolder/utils.ts +++ b/web/apps/photos/src/services/watchFolder/utils.ts @@ -1,5 +0,0 @@ -export const getParentFolderName = (filePath: string) => { - const folderPath = filePath.substring(0, filePath.lastIndexOf("/")); - const folderName = folderPath.substring(folderPath.lastIndexOf("/") + 1); - return folderName; -}; diff --git a/web/apps/photos/src/services/watchFolder/watchFolderService.ts b/web/apps/photos/src/services/watchFolder/watchFolderService.ts index 791aed445..ac0ca3a88 100644 --- a/web/apps/photos/src/services/watchFolder/watchFolderService.ts +++ b/web/apps/photos/src/services/watchFolder/watchFolderService.ts @@ -15,7 +15,6 @@ import { groupFilesBasedOnCollectionID } from "utils/file"; import { getValidFilesToUpload } from "utils/watch"; import { removeFromCollection } from "../collectionService"; import { getLocalFiles } from "../fileService"; -import { getParentFolderName } from "./utils"; import { diskFileAddedCallback, diskFileRemovedCallback, @@ -642,3 +641,9 @@ class watchFolderService { } export default new watchFolderService(); + +export const getParentFolderName = (filePath: string) => { + const folderPath = filePath.substring(0, filePath.lastIndexOf("/")); + const folderName = folderPath.substring(folderPath.lastIndexOf("/") + 1); + return folderName; +};