diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-10-04 10:34:38 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-10-04 10:34:38 +0000 |
commit | efbcece07b3a91f4b475559997f892e24751f0e6 (patch) | |
tree | c7ee12626dbd268df4a94bd46b29f6fc7126d2d4 /apps/tree.c | |
parent | ae75c6eb0ae9c75173ab1b06a26cad30fc5344c9 (diff) | |
download | rockbox-efbcece07b3a91f4b475559997f892e24751f0e6.tar.gz rockbox-efbcece07b3a91f4b475559997f892e24751f0e6.zip |
New setting to control the file browser start location.
Set using the menu item in folder context menus, clear in the filebrowser settings.
Can be abused to start selecting a *file* (or have a folder selected) instead of a starting inside a folder by removing the trailing / in the .cfg
This only affects the file browser when it would open in / before (on boot, or when entereing after backing out of the browser before (*not* when exited with the menu action)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c index 730c59f611..01a00d1f40 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -545,7 +545,8 @@ char* get_current_file(char* buffer, size_t buffer_len) | |||
545 | { | 545 | { |
546 | if (tc.dirlength) | 546 | if (tc.dirlength) |
547 | { | 547 | { |
548 | strlcat(buffer, "/", buffer_len); | 548 | if (buffer[strlen(buffer)-1] != '/') |
549 | strlcat(buffer, "/", buffer_len); | ||
549 | if (strlcat(buffer, e->name, buffer_len) >= buffer_len) | 550 | if (strlcat(buffer, e->name, buffer_len) >= buffer_len) |
550 | return NULL; | 551 | return NULL; |
551 | } | 552 | } |