fix: write histroy in shell
This commit is contained in:
parent
f2ea7c1fbd
commit
5a91ecfb7c
|
@ -750,7 +750,7 @@ void shellReadHistory() {
|
||||||
|
|
||||||
void shellWriteHistory() {
|
void shellWriteHistory() {
|
||||||
SShellHistory *pHistory = &shell.history;
|
SShellHistory *pHistory = &shell.history;
|
||||||
TdFilePtr pFile = taosOpenFile(pHistory->file, TD_FILE_WRITE | TD_FILE_STREAM);
|
TdFilePtr pFile = taosOpenFile(pHistory->file, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_STREAM | TD_FILE_APPEND);
|
||||||
if (pFile == NULL) return;
|
if (pFile == NULL) return;
|
||||||
|
|
||||||
for (int32_t i = pHistory->hstart; i != pHistory->hend;) {
|
for (int32_t i = pHistory->hstart; i != pHistory->hend;) {
|
||||||
|
|
Loading…
Reference in New Issue