Skip to content

Commit

Permalink
fix: Rename windows file separators characters ('\\') to '.' as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Aug 22, 2016
1 parent ca79921 commit 207bfc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ pub fn filename_to_module(filename: &str) -> StdString {
.map(|ext| &filename[..filename.len() - ext.len() - 1])
.unwrap_or(filename)
});

name.replace("/", ".")
name.replace(|c: char| c == '/' || c == '\\', ".")
}

/// Creates a new virtual machine with support for importing other modules and with all primitives
Expand Down

0 comments on commit 207bfc9

Please sign in to comment.