diff options
Diffstat (limited to 'apps/onplay.c')
-rw-r--r-- | apps/onplay.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 72912579f9..f5b8476492 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include "debug.h" | 27 | #include "debug.h" |
28 | #include "lcd.h" | 28 | #include "lcd.h" |
29 | #include "dir.h" | ||
30 | #include "file.h" | 29 | #include "file.h" |
31 | #include "audio.h" | 30 | #include "audio.h" |
32 | #include "menu.h" | 31 | #include "menu.h" |
@@ -63,6 +62,7 @@ | |||
63 | #include "statusbar-skinned.h" | 62 | #include "statusbar-skinned.h" |
64 | #include "pitchscreen.h" | 63 | #include "pitchscreen.h" |
65 | #include "viewport.h" | 64 | #include "viewport.h" |
65 | #include "filefuncs.h" | ||
66 | 66 | ||
67 | static int context; | 67 | static int context; |
68 | static char* selected_file = NULL; | 68 | static char* selected_file = NULL; |
@@ -484,14 +484,14 @@ static int remove_dir(char* dirname, int len) | |||
484 | entry = readdir(dir); | 484 | entry = readdir(dir); |
485 | if (!entry) | 485 | if (!entry) |
486 | break; | 486 | break; |
487 | 487 | struct dirinfo info = dir_get_info(dir, entry); | |
488 | dirname[dirlen] ='\0'; | 488 | dirname[dirlen] ='\0'; |
489 | /* inform the user which dir we're deleting */ | 489 | /* inform the user which dir we're deleting */ |
490 | splash(0, dirname); | 490 | splash(0, dirname); |
491 | 491 | ||
492 | /* append name to current directory */ | 492 | /* append name to current directory */ |
493 | snprintf(dirname+dirlen, len-dirlen, "/%s", entry->d_name); | 493 | snprintf(dirname+dirlen, len-dirlen, "/%s", entry->d_name); |
494 | if (entry->attribute & ATTR_DIRECTORY) | 494 | if (info.attribute & ATTR_DIRECTORY) |
495 | { /* remove a subdirectory */ | 495 | { /* remove a subdirectory */ |
496 | if (!strcmp((char *)entry->d_name, ".") || | 496 | if (!strcmp((char *)entry->d_name, ".") || |
497 | !strcmp((char *)entry->d_name, "..")) | 497 | !strcmp((char *)entry->d_name, "..")) |
@@ -783,6 +783,7 @@ static bool clipboard_pastedirectory(char *src, int srclen, char *target, | |||
783 | if (!entry) | 783 | if (!entry) |
784 | break; | 784 | break; |
785 | 785 | ||
786 | struct dirinfo info = dir_get_info(srcdir, entry); | ||
786 | /* append name to current directory */ | 787 | /* append name to current directory */ |
787 | snprintf(src+srcdirlen, srclen-srcdirlen, "/%s", entry->d_name); | 788 | snprintf(src+srcdirlen, srclen-srcdirlen, "/%s", entry->d_name); |
788 | snprintf(target+targetdirlen, targetlen-targetdirlen, "/%s", | 789 | snprintf(target+targetdirlen, targetlen-targetdirlen, "/%s", |
@@ -790,7 +791,7 @@ static bool clipboard_pastedirectory(char *src, int srclen, char *target, | |||
790 | 791 | ||
791 | DEBUGF("Copy %s to %s\n", src, target); | 792 | DEBUGF("Copy %s to %s\n", src, target); |
792 | 793 | ||
793 | if (entry->attribute & ATTR_DIRECTORY) | 794 | if (info.attribute & ATTR_DIRECTORY) |
794 | { /* copy/move a subdirectory */ | 795 | { /* copy/move a subdirectory */ |
795 | if (!strcmp((char *)entry->d_name, ".") || | 796 | if (!strcmp((char *)entry->d_name, ".") || |
796 | !strcmp((char *)entry->d_name, "..")) | 797 | !strcmp((char *)entry->d_name, "..")) |