commit
06a22eefe7
|
@ -765,7 +765,9 @@ void read_history() {
|
||||||
FILE *f = fopen(f_history, "r");
|
FILE *f = fopen(f_history, "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
#ifndef WINDOWS
|
#ifndef WINDOWS
|
||||||
fprintf(stderr, "Failed to open file %s\n", f_history);
|
if (errno != ENOENT) {
|
||||||
|
fprintf(stderr, "Failed to open file %s, reason:%s\n", f_history, strerror(errno));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -792,7 +794,7 @@ void write_history() {
|
||||||
FILE *f = fopen(f_history, "w");
|
FILE *f = fopen(f_history, "w");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
#ifndef WINDOWS
|
#ifndef WINDOWS
|
||||||
fprintf(stderr, "Failed to open file %s for write\n", f_history);
|
fprintf(stderr, "Failed to open file %s for write, reason:%s\n", f_history, strerror(errno));
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue