(source: &Path, destination: &Path)
| 8673 | } |
| 8674 | |
| 8675 | fn copy_extension_sql_dir(source: &Path, destination: &Path) -> Result<bool> { |
| 8676 | if !source.is_dir() { |
| 8677 | return Ok(false); |
| 8678 | } |
| 8679 | let mut copied = false; |
| 8680 | for entry in sorted_files(source)? { |
| 8681 | if entry.extension().and_then(|ext| ext.to_str()) != Some("sql") { |
| 8682 | continue; |
| 8683 | } |
| 8684 | let file_name = entry |
| 8685 | .file_name() |
| 8686 | .ok_or_else(|| anyhow!("SQL file has no name: {}", entry.display()))?; |
| 8687 | copy_file(&entry, &destination.join(file_name))?; |
| 8688 | copied = true; |
| 8689 | } |
| 8690 | Ok(copied) |
| 8691 | } |
| 8692 | |
| 8693 | fn stage_contrib_extension( |
| 8694 | source: &Path, |
no test coverage detected