File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ impl UhyveFileMap {
3030 /// * `mappings` - A list of host->guest path mappings with the format "./host_path.txt:guest.txt"
3131 /// * `tempdir` - Path to create temporary directory on
3232 pub fn new ( mappings : & [ String ] , tempdir : Option < PathBuf > ) -> UhyveFileMap {
33- UhyveFileMap {
33+ let fm = UhyveFileMap {
3434 files : mappings
3535 . iter ( )
3636 . map ( String :: as_str)
@@ -39,7 +39,13 @@ impl UhyveFileMap {
3939 . collect ( ) ,
4040 tempdir : create_temp_dir ( tempdir) ,
4141 fdmap : UhyveFileDescriptorLayer :: default ( ) ,
42- }
42+ } ;
43+ assert_eq ! (
44+ fm. files. len( ) ,
45+ mappings. len( ) ,
46+ "Error when creating filemap. Are duplicate paths present?"
47+ ) ;
48+ fm
4349 }
4450
4551 /// Returns the host_path on the host filesystem given a requested guest_path, if it exists.
You can’t perform that action at this time.
0 commit comments