message: Removes PhysicalFS create_root calls
diff: @@ -239,19 +239,6 @@ impl PhysicalFS {
  Err(GameError::FilesystemError(msg))
  }
  }
  -
  - /// Creates the PhysicalFS's root directory if necessary.
  - /// Idempotent.
  - /// This way we can not create the directory until it's
  - /// actually used, though it IS a tiny bit of a performance
  - /// malus.
  - fn create_root(&self) -> GameResult {
  - if !self.root.exists() {
  - fs::create_dir_all(&self.root).map_err(GameError::from)
  - } else {
  - Ok(())
  - }
  - }
  }
  impl Debug for PhysicalFS {
  @@ -275,7 +262,7 @@ impl VFS for PhysicalFS {
  );
  return Err(GameError::FilesystemError(msg));
  }
  - self.create_root()?;
  +
  let p = self.to_absolute(path)?;
  open_options
  .to_fs_openoptions()
  @@ -293,7 +280,7 @@ impl VFS for PhysicalFS {
  .to_string(),
  ));
  }
  - self.create_root()?;
  +
  let p = self.to_absolute(path)?;
  //println!("Creating {:?}", p);
  fs::DirBuilder::new()
  @@ -310,7 +297,6 @@ impl VFS for PhysicalFS {
  ));
  }
  - self.create_root()?;
  let p = self.to_absolute(path)?;
  if p.is_dir() {
  fs::remove_dir(p).map_err(GameError::from)
  @@ -329,7 +315,6 @@ impl VFS for PhysicalFS {
  ));
  }
  - self.create_root()?;
  let p = self.to_absolute(path)?;
  if p.is_dir() {
  fs::remove_dir_all(p).map_err(GameError::from)
  @@ -348,7 +333,6 @@ impl VFS for PhysicalFS {
  /// Get the file's metadata
  fn metadata(&self, path: &Path) -> GameResult<Box<dyn VMetadata>> {
  - self.create_root()?;
  let p = self.to_absolute(path)?;
  p.metadata()
  .map(|m| Box::new(PhysicalMetadata(m)) as Box<dyn VMetadata>)
  @@ -357,7 +341,6 @@ impl VFS for PhysicalFS {
  /// Retrieve the path entries in this path
  fn read_dir(&self, path: &Path) -> GameResult<Box<dyn Iterator<Item = GameResult<PathBuf>>>> {
  - self.create_root()?;
  let p = self.to_absolute(path)?;
  // This is inconvenient because path() returns the full absolute
  // path of the bloody file, which is NOT what we want!
  