Stephan3 / dwc2-for-klipper

A translator between DWC2 and Klipper
GNU General Public License v3.0
160 stars 38 forks source link

Normalize and expand user in virutal sd path #9

Closed yxist closed 5 years ago

yxist commented 5 years ago

Normalizes the path in exactly the same way as it's done in the virtual_sdcard module in klipper. Using paths such as ~/virt_sd/ previously caused errors.

This patch allows people to use paths relative to their home folder as their virtual sdcard without any problems.

Stephan3 commented 5 years ago

Hi,

Thanks for contributing. Why does one not use the example config?

Br

yxist commented 5 years ago

I just had the virtual sdcard set up that way before installing dwc2 so i felt no need to change it. I had no idea path relative to ~/ could cause a problem. It gave me an error that: "DWC2 failed to start, no webif found in ~/virt_sd/dwc2/web/". And that confused me for a while as the files were clearly there. I just copied the way it was done in the virtual_sdcard.py module so that it's consistent.

Stephan3 commented 5 years ago

understood, tested,works .> merged.

thanks