[exec] missed creating workdir

The workdir was not being created in some cases.

Related to #1247

Also, bump version
pull/1249/head
Tim Stack 1 month ago
parent f5946a502a
commit 547b7308e4

@ -5,8 +5,8 @@ include(cmake/prelude.cmake)
set(CMAKE_CXX_STANDARD 14)
project(
lnav
VERSION 0.12.1
DESCRIPTION "An advanced log file viewer for the small-scale."
VERSION 0.12.2
DESCRIPTION "An advanced log file viewer for the terminal."
HOMEPAGE_URL "https://lnav.org/"
LANGUAGES CXX C
)

@ -1,4 +1,4 @@
AC_INIT([lnav],[0.12.1],[lnav@googlegroups.com],[lnav],[http://lnav.org])
AC_INIT([lnav],[0.12.2],[lnav@googlegroups.com],[lnav],[http://lnav.org])
AC_CONFIG_SRCDIR([src/lnav.cc])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])

@ -1,5 +1,5 @@
VERSION=0.12.1
VERSION=0.12.2
VERSION_TAG=v$(VERSION)

@ -1052,6 +1052,8 @@ pipe_callback(exec_context& ec, const std::string& cmdline, auto_fd& fd)
return std::string();
});
}
std::error_code errc;
ghc::filesystem::create_directories(lnav::paths::workdir(), errc);
auto open_temp_res = lnav::filesystem::open_temp_file(lnav::paths::workdir()
/ "exec.XXXXXX");
if (open_temp_res.isErr()) {

@ -1008,6 +1008,8 @@ rl_callback_int(readline_curses* rc, bool is_alt)
}
case ln_mode_t::EXEC: {
std::error_code errc;
ghc::filesystem::create_directories(lnav::paths::workdir(), errc);
auto open_temp_res = lnav::filesystem::open_temp_file(
lnav::paths::workdir() / "exec.XXXXXX");

@ -44,6 +44,8 @@ class url_loader : public curl_request {
public:
url_loader(const std::string& url) : curl_request(url)
{
std::error_code errc;
ghc::filesystem::create_directories(lnav::paths::workdir(), errc);
auto tmp_res = lnav::filesystem::open_temp_file(lnav::paths::workdir()
/ "url.XXXXXX");
if (tmp_res.isErr()) {

@ -676,6 +676,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out \
$(srcdir)/%reldir%/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err \
$(srcdir)/%reldir%/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.out \
$(srcdir)/%reldir%/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.err \
$(srcdir)/%reldir%/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.out \
$(srcdir)/%reldir%/test_sql.sh_85fe3b9803254ea54b864d4865d7bd4d7a7f86c6.err \
$(srcdir)/%reldir%/test_sql.sh_85fe3b9803254ea54b864d4865d7bd4d7a7f86c6.out \
$(srcdir)/%reldir%/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.err \

@ -3,8 +3,8 @@
# '|/path/to/this/file' in lnav to execute this file and
# restore the state of the session.
;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.12.1' || ' or later')
WHERE lnav_version() < '0.12.1' COLLATE naturalcase
;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.12.2' || ' or later')
WHERE lnav_version() < '0.12.2' COLLATE naturalcase
# The files loaded into the session were:

@ -3,8 +3,8 @@
# '|/path/to/this/file' in lnav to execute this file and
# restore the state of the session.
;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.12.1' || ' or later')
WHERE lnav_version() < '0.12.1' COLLATE naturalcase
;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.12.2' || ' or later')
WHERE lnav_version() < '0.12.2' COLLATE naturalcase
# The files loaded into the session were:

@ -0,0 +1,4 @@
Min: 0   1-23   24-48   49+ Max: 291690
 Thu Nov 03 00:15:00               
70 values in the range 0.00-3788.18
 Thu Nov 03 00:20:00
Loading…
Cancel
Save