L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
118 stars 22 forks source link

Crash when "corrupted" disk is plugged in #104

Closed ProkopRandacek closed 9 months ago

ProkopRandacek commented 2 years ago
C:\Users\Prokop\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_4.2.0>python auto.py protab
checking for updates
Traceback (most recent call last):
  File "C:\Users\Prokop\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_4.2.0\auto.py", line 880, in <module>
    auto(*sys.argv[1:])
  File "C:\Users\Prokop\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_4.2.0\auto.py", line 462, in auto
    availableDrives = [
  File "C:\Users\Prokop\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_4.2.0\auto.py", line 463, in <listcomp>
    "%s:/" % d for d in string.ascii_uppercase if Path(f"{d}:/").exists()
  File "C:\Users\Prokop\AppData\Local\Programs\Python\Python39\lib\pathlib.py", line 1414, in exists
    self.stat()
  File "C:\Users\Prokop\AppData\Local\Programs\Python\Python39\lib\pathlib.py", line 1222, in stat
    return self._accessor.stat(self)
OSError: [WinError 1005] The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted: 'D:\\'

C:\Users\Prokop\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_4.2.0>

I have a Linux btrfs partition that Windows recognises as corrupted D: parittion. From the error it seems like the progam is for some reason trying to access the disk and then crashes.

sonowz commented 2 years ago

There was a similar case which was solved by PR #83. The only difference is the error type, which is OSError, not PermissionError. I'll fix this