mirror of https://github.com/arendst/Tasmota.git
Fix config filename truncation
5.12.0m * Fix configuration filename truncation when it contains spaces (#2484, #2490)
This commit is contained in:
parent
b7ed866803
commit
cb0305d2a3
|
@ -3,6 +3,7 @@
|
|||
* Add random window to timers (#2447)
|
||||
* Add optional KNX IP Protocol Support (#2402)
|
||||
* Fix compile error when using ESP/Arduino library v2.3.0 by reverting KNX async UDP library to default UDP library (#2488,#2492,#2493)
|
||||
* Fix configuration filename truncation when it contains spaces (#2484, #2490)
|
||||
*
|
||||
* 5.12.0l
|
||||
* Release rules up to 511 characters
|
||||
|
|
|
@ -1001,7 +1001,7 @@ void HandleBackupConfiguration()
|
|||
WebServer->setContentLength(sizeof(buffer));
|
||||
|
||||
char attachment[100];
|
||||
snprintf_P(attachment, sizeof(attachment), PSTR("attachment; filename=Config_%s_%s.dmp"), Settings.friendlyname[0], my_version);
|
||||
snprintf_P(attachment, sizeof(attachment), PSTR("attachment; filename=Config_%s_%s.dmp"), SpaceToUnderscore(Settings.friendlyname[0]), my_version);
|
||||
WebServer->sendHeader(F("Content-Disposition"), attachment);
|
||||
WebServer->send(200, FPSTR(HDR_CTYPE_STREAM), "");
|
||||
memcpy(buffer, &Settings, sizeof(buffer));
|
||||
|
|
Loading…
Reference in New Issue