path: root/firmware/general.c
diff options
authorThomas Martitz <>2011-12-25 20:11:18 +0000
committerThomas Martitz <>2011-12-25 20:11:18 +0000
commit20b662a946861b5acee8970948a22f7a2d1aedf3 (patch)
tree392d9568a3baaa23be0e109799485255ddcd067f /firmware/general.c
parent16784598ac550dab147ea8ee15634a2f15739fff (diff)
rbpaths: Add new special dir HOME_DIR for RaaA.
HOME_DIR is intended for not-so-advanced files which shall be user visible, and thus not in /.rockbox. Therefore HOME_DIR is translated to $HOME on RaaA, /sdcard on android, the internal memory on ypr0 and "/" on native targets. ROCKBOX_DIR ("/.rockbox") already existed as special and is translated to whatever the real rockbox dir is on the target (e.g. /sdcard/rockbox on android), but it's not suitable for some files we generate (e.g. battery-bench.txt). git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/general.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/general.c b/firmware/general.c
index 3daf2f0a78..8e6d5af9a0 100644
--- a/firmware/general.c
+++ b/firmware/general.c
@@ -24,6 +24,7 @@
#include "general.h"
#include "file.h"
#include "dir.h"
+#include "rbpaths.h"
#include "limits.h"
#include "stdlib.h"
#include "string-extra.h"
@@ -126,7 +127,7 @@ char *create_numbered_filename(char *buffer, const char *path,
/* automatic numbering */
max_num = 0;
- dir = opendir(pathlen ? buffer : "/");
+ dir = opendir(pathlen ? buffer : HOME_DIR);
if (!dir)
return NULL;