summaryrefslogtreecommitdiff
path: root/examples/detect.c
diff options
context:
space:
mode:
authorStanisław Pitucha <viraptor@gmail.com>2017-02-04 09:35:54 +1100
committerStanisław Pitucha <viraptor@gmail.com>2017-02-04 09:35:54 +1100
commit4c162fa4eef539fa4eae3f4f92f0f4bf60d70c19 (patch)
tree12835a05f351728f0ebc4718f1d82dd5ba36426d /examples/detect.c
parent0e78a1e128c82f51eb1a8b992e5594254ca99cf1 (diff)
downloadlibmtp-4c162fa4eef539fa4eae3f4f92f0f4bf60d70c19.tar.gz
Add LIBMTP_FILES_AND_FOLDERS_ROOT and fix examples
Examples assumed that parent id 0 will list only the top directory, but actually that's an id for all files (it does happen to correspond to the reported parent id however). The actual id to be used for the top folder is 0xffffffff. Add a new define to make the value more obvious as well.
Diffstat (limited to 'examples/detect.c')
-rw-r--r--examples/detect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/detect.c b/examples/detect.c
index 220f92e..34ca996 100644
--- a/examples/detect.c
+++ b/examples/detect.c
@@ -231,7 +231,7 @@ int main (int argc, char **argv)
/* Get file listing for the root directory, no other dirs */
files = LIBMTP_Get_Files_And_Folders(device,
storage->id,
- 0);
+ LIBMTP_FILES_AND_FOLDERS_ROOT);
if (files != NULL) {
LIBMTP_file_t *file, *tmp;