Skip to content

Commit 5816599

Browse files
committed
init: Remove canonicalize call.
During file creation, canonical form is both unnecessary and is an error. The canonicalize method ensures the path exists.
1 parent cc307eb commit 5816599

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/init.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ impl TemplateBuilder {
481481
for entry in entries {
482482
let mut entry = entry?;
483483
let relative_path = entry.path()?;
484-
let mut filename = workspace.join(relative_path).canonicalize()?;
484+
let mut filename = workspace.join(relative_path);
485485

486486
if template_skip.iter().any(|&name| filename.ends_with(name)) {
487487
log::debug!(
@@ -509,7 +509,7 @@ impl TemplateBuilder {
509509

510510
if filename.ends_with(dc_filename1) || filename.ends_with(dc_filename2) {
511511
if attempt_single_file && self.is_single_file_eligible() {
512-
filename = workspace.join(".devcontainer.json").canonicalize()?;
512+
filename = workspace.join(".devcontainer.json");
513513
}
514514

515515
if self.features.len() > 0 {

0 commit comments

Comments
 (0)