fix: ignore subdirs when walking through dirs
This fixes a bug where save-sync track would never work because we would try to interpret a directory as a file (which held some data we would then try to read)
This commit is contained in:
		@@ -109,9 +109,14 @@ impl Archive {
 | 
				
			|||||||
            for maybe_entry in WalkDir::new(path) {
 | 
					            for maybe_entry in WalkDir::new(path) {
 | 
				
			||||||
                match maybe_entry {
 | 
					                match maybe_entry {
 | 
				
			||||||
                    Ok(entry) => {
 | 
					                    Ok(entry) => {
 | 
				
			||||||
 | 
					                        if entry.path().is_file() {
 | 
				
			||||||
                            let game_file = GameFile::new(entry.path())?;
 | 
					                            let game_file = GameFile::new(entry.path())?;
 | 
				
			||||||
                            game_files.push(game_file);
 | 
					                            game_files.push(game_file);
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        // FIXME: WalkDir will also return the paths of files. DO we want to track these?
 | 
				
			||||||
 | 
					                        // if so, how will be do that?
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                    Err(err) => {
 | 
					                    Err(err) => {
 | 
				
			||||||
                        let io_err: std::io::Error = err.into();
 | 
					                        let io_err: std::io::Error = err.into();
 | 
				
			||||||
                        return Err(io_err.into());
 | 
					                        return Err(io_err.into());
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user