mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Handle copying to the same path
This commit is contained in:
parent
84a9f892a9
commit
6a6e28afda
@ -431,7 +431,10 @@ bool PathCopyWorker(char* dest, char* orig, bool overwrite, bool move) {
|
||||
strncpy(dname, oname, 256 - (dname - dest));
|
||||
|
||||
// check if destination is part of or equal origin
|
||||
if (strncmp(dest, orig, strnlen(orig, 255)) == 0) {
|
||||
if (strncmp(dest, orig, 255) == 0) {
|
||||
if (!ShowInputPrompt(dname, 255 - (dname - dest), "Destination is equal to origin\nChoose another name?"))
|
||||
return false;
|
||||
} else if (strncmp(dest, orig, strnlen(orig, 255)) == 0) {
|
||||
if ((dest[strnlen(orig, 255)] == '/') || (dest[strnlen(orig, 255)] == '\0')) {
|
||||
ShowPrompt(false, "Error: Destination is part of origin");
|
||||
return false;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "virtual.h"
|
||||
#include "image.h"
|
||||
|
||||
#define VERSION "0.4.4"
|
||||
#define VERSION "0.4.5"
|
||||
|
||||
#define N_PANES 2
|
||||
#define IMG_DRV "789I"
|
||||
|
Loading…
x
Reference in New Issue
Block a user