mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 11:00:36 +00:00
fix: allow includes to include top level files
This commit is contained in:
parent
e5e2bbeeb4
commit
564d9de675
2 changed files with 6 additions and 3 deletions
|
@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Fix `includes` not supporting root files by @daimond113
|
||||
|
||||
## [0.5.0-rc.13] - 2024-11-28
|
||||
### Added
|
||||
- Print that no updates are available in `outdated` command by @daimond113
|
||||
|
|
|
@ -255,11 +255,10 @@ pub async fn matching_globs_old_behaviour<'a, P: AsRef<Path>, I: IntoIterator<It
|
|||
let path = entry.path();
|
||||
let relative_path = path.strip_prefix(dir.as_ref()).unwrap();
|
||||
let file_name = path.file_name().unwrap();
|
||||
let mut is_filename_match = false;
|
||||
let is_filename_match =
|
||||
is_root && file_name.to_str().is_some_and(|s| file_names.contains(s));
|
||||
|
||||
if entry.file_type().await?.is_dir() {
|
||||
is_filename_match =
|
||||
is_root && file_name.to_str().is_some_and(|s| file_names.contains(s));
|
||||
read_dirs.push((
|
||||
fs::read_dir(&path).await?,
|
||||
is_entire_dir_included || is_filename_match,
|
||||
|
|
Loading…
Reference in a new issue