From 69c6b6c4a9283793cbd598fe5548ab74aaf82bd4 Mon Sep 17 00:00:00 2001 From: JoshuaMKW Date: Mon, 28 Aug 2023 15:44:39 -0500 Subject: [PATCH 1/6] Attempt to fix pathing discrepancy --- source/cli/Rszst.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/cli/Rszst.cpp b/source/cli/Rszst.cpp index 3a1129324..49e348c3c 100644 --- a/source/cli/Rszst.cpp +++ b/source/cli/Rszst.cpp @@ -679,9 +679,7 @@ class ExtractArchive { m_to = m_opt.to.view(); if (m_to.empty()) { - std::filesystem::path p = m_from; - p.replace_extension(".d"); - m_to = p; + m_to = rsl::filesystem::current_path(); } if (!FS_TRY(rsl::filesystem::exists(m_from))) { fmt::print(stderr, "Error: File {} does not exist.\n", m_from.string()); From 5f27578dcf22caf2c003069ba143b36a945990ef Mon Sep 17 00:00:00 2001 From: JoshuaMK <60854312+JoshuaMKW@users.noreply.github.com> Date: Tue, 29 Aug 2023 01:10:07 -0500 Subject: [PATCH 2/6] Add TRY statement --- source/cli/Rszst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cli/Rszst.cpp b/source/cli/Rszst.cpp index 49e348c3c..2fba5be1a 100644 --- a/source/cli/Rszst.cpp +++ b/source/cli/Rszst.cpp @@ -679,7 +679,7 @@ class ExtractArchive { m_to = m_opt.to.view(); if (m_to.empty()) { - m_to = rsl::filesystem::current_path(); + m_to = FS_TRY(rsl::filesystem::current_path()); } if (!FS_TRY(rsl::filesystem::exists(m_from))) { fmt::print(stderr, "Error: File {} does not exist.\n", m_from.string()); From 0e011bccbff8b410065f43bd0b6b49be38671aa9 Mon Sep 17 00:00:00 2001 From: JoshuaMK <60854312+JoshuaMKW@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:33:44 -0500 Subject: [PATCH 3/6] Change to parent of src --- source/cli/Rszst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cli/Rszst.cpp b/source/cli/Rszst.cpp index 2fba5be1a..be4306c0e 100644 --- a/source/cli/Rszst.cpp +++ b/source/cli/Rszst.cpp @@ -679,7 +679,7 @@ class ExtractArchive { m_to = m_opt.to.view(); if (m_to.empty()) { - m_to = FS_TRY(rsl::filesystem::current_path()); + m_to = m_from.parent_path(); } if (!FS_TRY(rsl::filesystem::exists(m_from))) { fmt::print(stderr, "Error: File {} does not exist.\n", m_from.string()); From 2ac9c72d24c03ee87c5b3ad9fe25ccdb586a10a4 Mon Sep 17 00:00:00 2001 From: JoshuaMKW Date: Mon, 28 Aug 2023 15:44:39 -0500 Subject: [PATCH 4/6] Attempt to fix pathing discrepancy --- source/cli/Rszst.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/cli/Rszst.cpp b/source/cli/Rszst.cpp index aa16b2ac1..8a14eed51 100644 --- a/source/cli/Rszst.cpp +++ b/source/cli/Rszst.cpp @@ -681,9 +681,7 @@ class ExtractArchive { m_to = m_opt.to.view(); if (m_to.empty()) { - std::filesystem::path p = m_from; - p.replace_extension(".d"); - m_to = p; + m_to = rsl::filesystem::current_path(); } if (!FS_TRY(rsl::filesystem::exists(m_from))) { fmt::print(stderr, "Error: File {} does not exist.\n", m_from.string()); From b8e195a861c2b1f888dc21491225b8ff32a080ce Mon Sep 17 00:00:00 2001 From: JoshuaMK <60854312+JoshuaMKW@users.noreply.github.com> Date: Tue, 29 Aug 2023 01:10:07 -0500 Subject: [PATCH 5/6] Add TRY statement --- source/cli/Rszst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cli/Rszst.cpp b/source/cli/Rszst.cpp index 8a14eed51..753e23f07 100644 --- a/source/cli/Rszst.cpp +++ b/source/cli/Rszst.cpp @@ -681,7 +681,7 @@ class ExtractArchive { m_to = m_opt.to.view(); if (m_to.empty()) { - m_to = rsl::filesystem::current_path(); + m_to = FS_TRY(rsl::filesystem::current_path()); } if (!FS_TRY(rsl::filesystem::exists(m_from))) { fmt::print(stderr, "Error: File {} does not exist.\n", m_from.string()); From f6f17c3ab86ae7e80261096dd5a813ddbb3f05a1 Mon Sep 17 00:00:00 2001 From: JoshuaMK <60854312+JoshuaMKW@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:33:44 -0500 Subject: [PATCH 6/6] Change to parent of src --- source/cli/Rszst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cli/Rszst.cpp b/source/cli/Rszst.cpp index 753e23f07..265ad4697 100644 --- a/source/cli/Rszst.cpp +++ b/source/cli/Rszst.cpp @@ -681,7 +681,7 @@ class ExtractArchive { m_to = m_opt.to.view(); if (m_to.empty()) { - m_to = FS_TRY(rsl::filesystem::current_path()); + m_to = m_from.parent_path(); } if (!FS_TRY(rsl::filesystem::exists(m_from))) { fmt::print(stderr, "Error: File {} does not exist.\n", m_from.string());