Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eschan145 committed Jan 22, 2025
1 parent f10486e commit 7b0e3be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ extern "C" {
}
}

DK_API uint64_t get_dyknow_size(const std::string& directory) {
DK_API uint64_t _dyknow_size(const std::string& directory) {
uint64_t total = 0;
WIN32_FIND_DATAA data;
HANDLE find = FindFirstFile((directory + "\\*").c_str(), &data);

if (find = INVALID_HANDLE_VALUE) {
if (find == INVALID_HANDLE_VALUE) {
error("Failed to access DyKnow folder! Validating...\n");
validate();
return 0;
Expand All @@ -109,7 +109,7 @@ DK_API uint64_t get_dyknow_size(const std::string& directory) {

if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
// If it's a directory, recursively calculate its size
total += get_dyknow_size(directory);
total += get_dyknow_size(full_path);
} else {
LARGE_INTEGER file_size;

Expand Down Expand Up @@ -169,7 +169,7 @@ DK_API void validate() {
<< "integrity.\n";
}

uint64_t size = get_dyknow_size();
uint64_t size = dyknow_size();
std::cout << "DyKnow folder size: " << size << "\n";
}

Expand Down
2 changes: 1 addition & 1 deletion src/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extern "C" {
DK_API int get_kill_method();
DK_API void set_kill_method(int value);

DK_API uint64_t get_dyknow_size(const std::string& directory = FOLDER_PATH);
DK_API uint64_t dyknow_size(const std::string& directory = FOLDER_PATH);

DK_API void validate();
DK_API const char* get_folder_path();
Expand Down

0 comments on commit 7b0e3be

Please sign in to comment.