Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Print env
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: unshieldv3.x86_64
path: ${{github.workspace}}/build/unshieldv3
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,12 @@ Thumbs.db
# Build directory
# ---------------
build/*

# generated config
config.h

# clangd cache
.cache/

# VScode IDE files
.vscode/
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ add_executable (unshieldv3
ISArchiveV3.cpp
blast.c
)
install(TARGETS unshieldv3)

target_link_libraries(unshieldv3)

install(TARGETS unshieldv3)
6 changes: 5 additions & 1 deletion ISArchiveV3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
#include "ISArchiveV3.h"
#include <algorithm>
#include <cassert>
#include <sstream>
#include <string>
#include <iostream>
#include <sstream>
#include <exception>
Expand Down Expand Up @@ -112,8 +114,10 @@ std::tm ISArchiveV3::File::tm() const {

std::filesystem::path ISArchiveV3::File::path() const {
std::string fp = full_path;
// windows paths are wchar_t, convert
char pref_seperator = fs::path::preferred_separator;
std::replace(fp.begin(), fp.end(),
'\\', fs::path::preferred_separator);
'\\', pref_seperator);
return std::filesystem::path(fp);
}

Expand Down
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void info(const ISArchiveV3& archive) {
}
}

void list(const ISArchiveV3& archive, bool verbose = false) {
void list_archive(const ISArchiveV3& archive, bool verbose = false) {
size_t max_path = 0;
if (verbose) {
for (auto& f : archive.files()) {
Expand Down Expand Up @@ -166,7 +166,7 @@ int cmd_list(deque<string> subargs) {
return 1;
}
ISArchiveV3 archive(apath);
list(archive, verbose);
list_archive(archive, verbose);
return 0;
}

Expand Down
Loading