Skip to content

Commit 40ace7a

Browse files
committed
Fix psql_history path for Windows
1 parent 67f1bc2 commit 40ace7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/psql/input.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ initializeInput(int flags)
348348
initialize_readline();
349349
#ifndef HAVE_WIN32_LIBEDIT
350350
rl_initialize();
351-
#endif
351+
#endif
352352

353353
useHistory = true;
354354
using_history();
@@ -368,7 +368,11 @@ initializeInput(int flags)
368368
if (histfile == NULL)
369369
{
370370
if (get_home_path(home))
371+
#ifdef HAVE_WIN32_LIBEDIT
372+
psql_history = psprintf("%s\\%s", home, PSQLHISTORY);
373+
#else
371374
psql_history = psprintf("%s/%s", home, PSQLHISTORY);
375+
#endif
372376
}
373377
else
374378
{

0 commit comments

Comments
 (0)