Skip to content

Commit

Permalink
Merge pull request #4977 from tomdereub/patch-1
Browse files Browse the repository at this point in the history
windows reserved word silently excluded - csync exclude.cpp
  • Loading branch information
mgallien authored Jul 18, 2023
2 parents 871812d + 6aacf4d commit c6436c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit c6436c4

Please sign in to comment.