Skip to content

Commit

Permalink
Update exec_cmd.c
Browse files Browse the repository at this point in the history
  • Loading branch information
illusion0001 authored Jun 27, 2023
1 parent 53fe909 commit b721104
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/exec_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void zipSave(const save_entry_t* entry, const char* exp_path)

static void copySave(const save_entry_t* save, const char* exp_path)
{
char* copy_path;
char copy_path[256] = {0};

if (strncmp(save->path, exp_path, strlen(exp_path)) == 0)
{
Expand All @@ -142,13 +142,11 @@ static void copySave(const save_entry_t* save, const char* exp_path)

init_loading_screen("Copying files...");

asprintf(&copy_path, "%s%08x_%s_%s/", exp_path, apollo_config.user_id, save->title_id, save->dir_name);
snprintf(copy_path, sizeof(copy_path), "%s%08x_%s_%s/", exp_path, apollo_config.user_id, save->title_id, save->dir_name);

LOG("Copying <%s> to %s...", save->path, copy_path);
copy_directory(save->path, save->path, copy_path);

free(copy_path);

stop_loading_screen();
show_message("Files successfully copied to:\n%s", exp_path);
}
Expand Down

0 comments on commit b721104

Please sign in to comment.