Skip to content

Commit

Permalink
rename FileSystemEventDb::resolveNameXXX() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fxdeniz committed Nov 26, 2023
1 parent d8a9516 commit 8c6363a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Server/FileMonitorSubSystem/FileMonitoringManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ void FileMonitoringManager::handleFolderDeleteEvent(const QString &parentDirPath

auto fsm = FileStorageManager::instance();

if(!eventDb->resolveFolderRenaming(currentPath).isEmpty())
currentPath = eventDb->resolveFolderRenaming(currentPath);
if(!eventDb->getOriginalFolderNameByNewName(currentPath).isEmpty())
currentPath = eventDb->getOriginalFolderNameByNewName(currentPath);

QJsonObject folderJson = fsm->getFolderJsonByUserPath(currentPath);

Expand Down Expand Up @@ -204,8 +204,8 @@ void FileMonitoringManager::handleFileDeleteEvent(const QString &parentDirPath,

auto fsm = FileStorageManager::instance();

if(!eventDb->resolveFileRenaming(_parentDirPath, fileName).isEmpty())
currentPath = eventDb->resolveFileRenaming(_parentDirPath, fileName);
if(!eventDb->getOriginalFileNameByNewName(_parentDirPath, fileName).isEmpty())
currentPath = eventDb->getOriginalFileNameByNewName(_parentDirPath, fileName);

QJsonObject fileJson = fsm->getFileJsonByUserPath(currentPath);

Expand Down
4 changes: 2 additions & 2 deletions Server/FileMonitorSubSystem/FileSystemEventDb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void FileSystemEventDb::addFolderRenamingEntry(const QString &oldUserFolderPath,
}
}

QString FileSystemEventDb::resolveFolderRenaming(const QString &userFolderPath) const
QString FileSystemEventDb::getOriginalFolderNameByNewName(const QString &userFolderPath) const
{
QReadLocker readLocker(lock);

Expand Down Expand Up @@ -212,7 +212,7 @@ void FileSystemEventDb::addFileRenamingEntry(const QString &userFolderPath, cons
}
}

QString FileSystemEventDb::resolveFileRenaming(const QString &userFolderPath, const QString &fileName) const
QString FileSystemEventDb::getOriginalFileNameByNewName(const QString &userFolderPath, const QString &fileName) const
{
QReadLocker readLocker(lock);

Expand Down
4 changes: 2 additions & 2 deletions Server/FileMonitorSubSystem/FileSystemEventDb.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class FileSystemEventDb
QHash<FileSystemEventDb::ItemStatus, QStringList> getEventsOnMonitoredFiles() const;

void addFolderRenamingEntry(const QString &oldUserFolderPath, const QString &newUserFolderPath);
QString resolveFolderRenaming(const QString &userFolderPath) const;
QString getOriginalFolderNameByNewName(const QString &userFolderPath) const;
void removeFolderRenamingEntry(const QString &newUserFolderPath);

void addFileRenamingEntry(const QString &userFolderPath, const QString &oldFileName, const QString &newFileName);
QString resolveFileRenaming(const QString &userFolderPath, const QString &fileName) const;
QString getOriginalFileNameByNewName(const QString &userFolderPath, const QString &fileName) const;
void removeFileRenamingEntry(const QString &userFolderPath, const QString &newFileName);

void addNewAddedFolder(const QString &userFolderPath, efsw::WatchID watchID);
Expand Down

0 comments on commit 8c6363a

Please sign in to comment.