mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
.DS_Store file shown as an unused media file (#3380)
* skip ds_store file * correct capitalization * skip ds_store file * correct capitalization * Update CONTRIBUTORS
This commit is contained in:
parent
40bcbe44bf
commit
7a0e51afc0
2 changed files with 6 additions and 1 deletions
|
@ -187,7 +187,7 @@ Christian Donat <https://github.com/cdonat2>
|
||||||
Asuka Minato <https://asukaminato.eu.org>
|
Asuka Minato <https://asukaminato.eu.org>
|
||||||
Dillon Baldwin <https://github.com/DillBal>
|
Dillon Baldwin <https://github.com/DillBal>
|
||||||
Voczi <https://github.com/voczi>
|
Voczi <https://github.com/voczi>
|
||||||
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
|
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
|
||||||
Themis Demetriades <themis100@outlook.com>
|
Themis Demetriades <themis100@outlook.com>
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -214,6 +214,10 @@ impl MediaChecker<'_> {
|
||||||
None => continue,
|
None => continue,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if fname_os == ".DS_Store" {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// skip folders
|
// skip folders
|
||||||
if dentry.file_type()?.is_dir() {
|
if dentry.file_type()?.is_dir() {
|
||||||
out.dirs.push(disk_fname.to_string());
|
out.dirs.push(disk_fname.to_string());
|
||||||
|
@ -575,6 +579,7 @@ pub(crate) mod test {
|
||||||
write_file(mgr.media_folder.join("foo[.jpg"), "foo")?;
|
write_file(mgr.media_folder.join("foo[.jpg"), "foo")?;
|
||||||
write_file(mgr.media_folder.join("_under.jpg"), "foo")?;
|
write_file(mgr.media_folder.join("_under.jpg"), "foo")?;
|
||||||
write_file(mgr.media_folder.join("unused.jpg"), "foo")?;
|
write_file(mgr.media_folder.join("unused.jpg"), "foo")?;
|
||||||
|
write_file(mgr.media_folder.join(".DS_Store"), ".DS_Store")?;
|
||||||
|
|
||||||
let (output, report) = {
|
let (output, report) = {
|
||||||
let mut checker = col.media_checker()?;
|
let mut checker = col.media_checker()?;
|
||||||
|
|
Loading…
Reference in a new issue