Skip to content

Commit

Permalink
ensure invalid file names are reported for files that are not ignored
Browse files Browse the repository at this point in the history
we currently notify invalid file names for files that the sync engine
will not upload because they are ignored for other reasons (selective
sync for example)

let's first check if the file is ignored and only if the file would be
uploaded, we can check the file name validity

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Mar 7, 2025
1 parent 1e041fd commit ad22498
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,7 @@ void ProcessDirectoryJob::process()
// For windows, the hidden state is also discovered within the vio
// local stat function.
// Recall file shall not be ignored (#4420)
bool isHidden = e.localEntry.isHidden || (!f.first.isEmpty() && f.first[0] == '.' && f.first != QLatin1String(".sys.admin#recall#"));
if (handleExcluded(path._target, e, entries, isHidden))
continue;
const auto isHidden = e.localEntry.isHidden || (!f.first.isEmpty() && f.first[0] == '.' && f.first != QLatin1String(".sys.admin#recall#"));

const auto isEncryptedFolderButE2eIsNotSetup = e.serverEntry.isValid() && e.serverEntry.isE2eEncrypted() &&
_discoveryData->_account->e2e() && !_discoveryData->_account->e2e()->isInitialized();
Expand All @@ -252,6 +250,10 @@ void ProcessDirectoryJob::process()
continue;
}

if (handleExcluded(path._target, e, entries, isHidden)) {
continue;
}

// HACK: Sometimes the serverEntry.etag does not correctly have its quotation marks amputated in the string.
// We are once again making sure they are chopped off here, but we should really find the root cause for why
// exactly they are not being lobbed off at any of the prior points of processing.
Expand Down

0 comments on commit ad22498

Please sign in to comment.