recalbox / recalbox-manager

Django project to manage a Recalbox from a web interface
MIT License
14 stars 54 forks source link

Carriage return problem when editing recalbox.conf #31

Closed rockaddicted closed 8 years ago

rockaddicted commented 8 years ago

Hi, I did a manual install of recalbox-manager on my recalbox. And I seen, after editing my recalbox.conf using the included tool than my file had a "retours à la ligne" problems.

Here is an example of my file :

## The rewind option is deactivated by default on these unsupported cores (don't edit please)^M
virtualboy.rewind=0^M
sega32x.rewind=0^M
segacd.rewind=0^M
psx.rewind=0^M
fbalibretro.rewind=0^M
vectrex.rewind=0^M

Is there a way to correct that, please ?

sveetch commented 8 years ago

Sure there should be a way to fix.

BUT, i have to know how :)

That's a little bit strange to see this kind of carriage return character "^M", seems to be an issue from your editor. What are you using to edit, Notepad on Windows or what ? And what are you using to read the file ?

sveetch commented 8 years ago

See :

sveetch commented 8 years ago

Ok, well i need to reproduce it on my Recalbox because on my simple Linux dev environnment, if i edit the file from manager interface with my browser (Firefox on ubuntu) then i open it with less or nano, i dont have any ^M caracter.

Actually i dont see why and how it can works on linux environment and not Recalbox, as the python code for this is pretty simple and are not subject to variation.

sveetch commented 8 years ago

Confirmed and reproduced on my box in 3.3.0(beta6). I didn't even know how i could have missed it because the corrupted conf cause many issues like ssh prompt is fucked, rom cant load anymore, etc..

rockaddicted commented 8 years ago

Yes indeed once the windows "end line" style used on an option line in recalbox.conf, recalbox can't read anymore this line. That is why we recommand to windows users editing their recalbox.conf, to don't use a text editor using this carriage return style (as wordpad). Here this carriage return style is automatically applied at each end lines. :-/