Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.9] windows reserved word silently excluded - csync exclude.cpp #5934

Merged
merged 3 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/csync/csync_exclude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const QString &path, bool exclu
}

if (csync_is_windows_reserved_word(bname)) {
return CSYNC_FILE_EXCLUDE_INVALID_CHAR;
return CSYNC_FILE_SILENTLY_EXCLUDED;
}

// Filter out characters not allowed in a filename on windows
Expand Down
4 changes: 2 additions & 2 deletions test/testexcludedfiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private slots:
QCOMPARE(check_file_full("file_trailing_space "), CSYNC_NOT_EXCLUDED);
QCOMPARE(check_file_full(" file_leading_and_trailing_space "), CSYNC_NOT_EXCLUDED);
QCOMPARE(check_file_full("file_trailing_dot."), CSYNC_FILE_EXCLUDE_INVALID_CHAR);
QCOMPARE(check_file_full("AUX"), CSYNC_FILE_EXCLUDE_INVALID_CHAR);
QCOMPARE(check_file_full("AUX"), CSYNC_FILE_SILENTLY_EXCLUDED);
QCOMPARE(check_file_full("file_invalid_char<"), CSYNC_FILE_EXCLUDE_INVALID_CHAR);
QCOMPARE(check_file_full("file_invalid_char\n"), CSYNC_FILE_EXCLUDE_INVALID_CHAR);
#endif
Expand Down Expand Up @@ -352,7 +352,7 @@ private slots:
QCOMPARE(check_file_traversal("file_trailing_space "), CSYNC_NOT_EXCLUDED);
QCOMPARE(check_file_traversal(" file_leading_and_trailing_space "), CSYNC_NOT_EXCLUDED);
QCOMPARE(check_file_traversal("file_trailing_dot."), CSYNC_FILE_EXCLUDE_INVALID_CHAR);
QCOMPARE(check_file_traversal("AUX"), CSYNC_FILE_EXCLUDE_INVALID_CHAR);
QCOMPARE(check_file_traversal("AUX"), CSYNC_FILE_SILENTLY_EXCLUDED);
QCOMPARE(check_file_traversal("file_invalid_char<"), CSYNC_FILE_EXCLUDE_INVALID_CHAR);
#endif

Expand Down
Loading