Skip to content

Commit

Permalink
fix: fix empty dir generate csv issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 5, 2021
1 parent d233172 commit 7446b13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/action/entry_usecases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ pub fn find_entry_define(paths: &EntryPaths, target_entry: &String) -> EntryDefi

pub fn sync_in_path(paths: &EntryPaths) -> Result<(), Box<dyn Error>> {
let (size, content) = Entrysets::generate(&paths.base)?;
fs::write(&paths.entries_csv, content)?;

update_entry_info(&paths.entry_node_info, &mut EntryNodeInfo { index: size });
if size > 0 {
fs::write(&paths.entries_csv, content)?;
update_entry_info(&paths.entry_node_info, &mut EntryNodeInfo { index: size });
}

Ok(())
}
Expand Down
1 change: 0 additions & 1 deletion src/cli/quake_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ fn sync_defines(conf: &&QuakeConfig) -> Result<(), Box<dyn Error>> {
}

let path_name = format!("{:}", entry.path().file_name().unwrap().to_str().unwrap());

if path_name.eq(&conf.server_location) {
continue;
}
Expand Down

0 comments on commit 7446b13

Please sign in to comment.