thliebig / openEMS

openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
http://openEMS.de
GNU General Public License v3.0
453 stars 156 forks source link

Pull Request #158 is Incorrect and Breaks all Python simulations #159

Closed biergaizi closed 5 days ago

biergaizi commented 5 days ago

Pull Request #158 attempted to "fix" the detection of symbolic link in the simulation path, unfortunately the contributor didn't test it. In the patch == was incorrectly used in place for !=, so now Python throws a RuntimeError if chdir() succeeds, and it now breaks all Python simulations.

#                            wrong
#                              v
if Path(os.getcwd()).resolve() == Path(sim_path).resolve():
    raise RuntimeError
biergaizi commented 5 days ago

Fixed by https://github.com/thliebig/openEMS/commit/91f3d7cfadf7afb83ed90583196f1160d5a9aec4