mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Fix crash when copying empty folders + misc formatting fixes (#65)
This commit is contained in:
parent
7e7ae6159a
commit
96b487781a
@ -96,7 +96,7 @@ int fcopy(const char *sourcePath, const char *destinationPath)
|
|||||||
chdir(sourcePath);
|
chdir(sourcePath);
|
||||||
vector<DirEntry> dirContents;
|
vector<DirEntry> dirContents;
|
||||||
getDirectoryContents(dirContents);
|
getDirectoryContents(dirContents);
|
||||||
DirEntry* entry = &dirContents.at(1);
|
DirEntry* entry = NULL;
|
||||||
|
|
||||||
mkdir(destinationPath, 0777);
|
mkdir(destinationPath, 0777);
|
||||||
for (int i = 1; i < ((int)dirContents.size()); i++) {
|
for (int i = 1; i < ((int)dirContents.size()); i++) {
|
||||||
|
|||||||
@ -427,7 +427,7 @@ bool fileBrowse_paste(char dest[256]) {
|
|||||||
if (pressed & KEY_A) {
|
if (pressed & KEY_A) {
|
||||||
char destPath[256];
|
char destPath[256];
|
||||||
iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW);
|
iprintf ("\x1b[%d;3H", optionOffset + OPTIONS_ENTRIES_START_ROW);
|
||||||
printf(optionOffset ? "Moving..." : "Copying...");
|
printf(optionOffset ? "Moving... " : "Copying...");
|
||||||
for (auto it = clipboard.begin(); it != clipboard.end(); ++it) {
|
for (auto it = clipboard.begin(); it != clipboard.end(); ++it) {
|
||||||
snprintf(destPath, sizeof(destPath), "%s%s", dest, it->name);
|
snprintf(destPath, sizeof(destPath), "%s%s", dest, it->name);
|
||||||
if (!strcmp (it->path, destPath))
|
if (!strcmp (it->path, destPath))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user