Skip to content

Commit

Permalink
#250: Ignore file names containing a backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Aug 8, 2023
1 parent 03f0006 commit 944400d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* Fixed:
* Detection of saves associated with the Ubisoft Game Launcher folder
on Linux when installed with Steam and Proton.
* On non-Windows systems, when recursively finding files in a directory,
file names containing a backslash would cause an error.
For now, these files will be ignored until they are properly supported.

## v0.20.0 (2023-07-10)

Expand Down
6 changes: 6 additions & 0 deletions src/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,12 @@ pub fn scan_game_for_backup(
.filter_map(filter_map_walkdir)
{
if child.file_type().is_file() {
#[cfg(not(target_os = "windows"))]
if child.file_name().to_string_lossy().contains('\\') {
// TODO: Support file names containing a slash.
continue;
}

let child = StrictPath::from(&child).rendered();
if filter.is_path_ignored(&child) {
log::debug!("[{name}] excluded: {}", child.raw());
Expand Down

0 comments on commit 944400d

Please sign in to comment.