Skip to content
Merged
Changes from 1 commit
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
21 changes: 17 additions & 4 deletions packages/app-lib/src/state/profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,15 @@ struct InitialScanFile {
cache_key: String,
}

fn should_ignore_project_file(
project_type: ProjectType,
file_name: &str,
) -> bool {
file_name.starts_with('.')
|| (project_type == ProjectType::ShaderPack
&& file_name.ends_with(".txt"))
}

Comment thread
Prospector marked this conversation as resolved.
Outdated
impl Profile {
pub async fn get(
path: &str,
Expand Down Expand Up @@ -648,8 +657,10 @@ impl Profile {
&& let Some(file_name) = subdirectory
.file_name()
.and_then(|x| x.to_str())
&& !(project_type == ProjectType::ShaderPack
&& file_name.ends_with(".txt"))
&& !should_ignore_project_file(
project_type,
file_name,
)
{
let file_size = subdirectory
.metadata()
Expand Down Expand Up @@ -1054,8 +1065,10 @@ impl Profile {
if subdirectory.is_file()
&& let Some(file_name) =
subdirectory.file_name().and_then(|x| x.to_str())
&& !(project_type == ProjectType::ShaderPack
&& file_name.ends_with(".txt"))
&& !should_ignore_project_file(
project_type,
file_name,
)
{
let file_size = subdirectory
.metadata()
Expand Down
Loading