Fix copying dirs to /gm9i/out (#51)

* Trim trailing whitespace

* Fix copying dirs to /gm9i/out
This commit is contained in:
Pk11 2020-03-19 16:24:38 -05:00 committed by GitHub
parent ca150269f7
commit 7b568f4ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,7 +315,10 @@ int fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) {
iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW+cursorScreenPos); iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW+cursorScreenPos);
printf("Copying... "); printf("Copying... ");
remove(destPath); remove(destPath);
fcopy(entry->name.c_str(), destPath); char sourcePath[PATH_MAX];
getcwd(sourcePath, PATH_MAX);
snprintf(sourcePath, sizeof(sourcePath), "%s%s", sourcePath, entry->name.c_str());
fcopy(sourcePath, destPath);
} else if (assignedOp[optionOffset] == 2) { } else if (assignedOp[optionOffset] == 2) {
if (access("fat:/gm9i", F_OK) != 0) { if (access("fat:/gm9i", F_OK) != 0) {
iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW+cursorScreenPos); iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW+cursorScreenPos);
@ -332,7 +335,10 @@ int fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) {
iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW+cursorScreenPos); iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW+cursorScreenPos);
printf("Copying... "); printf("Copying... ");
remove(destPath); remove(destPath);
fcopy(entry->name.c_str(), destPath); char sourcePath[PATH_MAX];
getcwd(sourcePath, PATH_MAX);
snprintf(sourcePath, sizeof(sourcePath), "%s%s", sourcePath, entry->name.c_str());
fcopy(sourcePath, destPath);
} else if (assignedOp[optionOffset] == 3) { } else if (assignedOp[optionOffset] == 3) {
nitroMounted = nitroFSInit(entry->name.c_str()); nitroMounted = nitroFSInit(entry->name.c_str());
if (nitroMounted) { if (nitroMounted) {