-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
Looking at the code for how renames are handled on macOS and Windows, I wonder if there are types:
Windows
Lines 205 to 211 in e8a6e95
| mQueue->enqueue( | |
| RENAMED, | |
| getUTF8Directory(fileName), | |
| getUTF8FileName(fileName), | |
| getUTF8Directory(fileName), | |
| getUTF8FileName(fileNameNew) | |
| ); |
I think it needs to be:
mQueue->enqueue(
RENAMED,
getUTF8Directory(fileName),
getUTF8FileName(fileName),
getUTF8Directory(fileNameNew),
getUTF8FileName(fileNameNew)
);macOS
nsfw/src/osx/FSEventsService.cpp
Lines 118 to 134 in e8a6e95
| if (binIterator->second->size() == 2) { | |
| std::string sideA = (*binIterator->second)[0], | |
| sideB = (*binIterator->second)[1]; | |
| std::string fullSideA = binIterator->first + "/" + sideA, | |
| fullSideB = binIterator->first + "/" + sideB; | |
| struct stat renameSideA, renameSideB; | |
| bool sideAExists = stat(fullSideA.c_str(), &renameSideA) == 0, | |
| sideBExists = stat(fullSideB.c_str(), &renameSideB) == 0; | |
| if (sideAExists && !sideBExists) { | |
| mQueue->enqueue(RENAMED, binIterator->first, sideB, binIterator->first, sideA); | |
| } else if (!sideAExists && sideBExists) { | |
| mQueue->enqueue(RENAMED, binIterator->first, sideA, binIterator->first, sideB); | |
| } else { | |
| demangle(fullSideA); | |
| demangle(fullSideB); | |
| } |
It seems to me that the directory name is the same for both files, but maybe on macOS this kind of event is only fired for a rename of a file in the same folder?
Metadata
Metadata
Assignees
Labels
No labels