Merge pull request #3073 from taosdata/feature/os
TD-1057 not show error if create file failed
This commit is contained in:
commit
afd940d903
|
@ -751,7 +751,9 @@ void read_history() {
|
||||||
|
|
||||||
FILE *f = fopen(f_history, "r");
|
FILE *f = fopen(f_history, "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
|
#ifndef WINDOWS
|
||||||
fprintf(stderr, "Failed to open file %s\n", f_history);
|
fprintf(stderr, "Failed to open file %s\n", f_history);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,7 +778,9 @@ void write_history() {
|
||||||
|
|
||||||
FILE *f = fopen(f_history, "w");
|
FILE *f = fopen(f_history, "w");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
|
#ifndef WINDOWS
|
||||||
fprintf(stderr, "Failed to open file %s for write\n", f_history);
|
fprintf(stderr, "Failed to open file %s for write\n", f_history);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue