title: Dropbox API not returning all files in list
body: <p>I am trying to get a full file list from my dropbox account using the python dropbox API, to later compare the local and remote folders and download only the changed files on my Raspberry PI. So for now I need the current file list on my account. I am trying to accomplish that by using this code:</p>
  
  <pre><code>client = dropbox.Dropbox("ACCESS_TOKEN")
  metadata = client.files_list_folder("", recursive=True, include_deleted=False, include_media_info=False)
  flist = []
  if metadata.has_more == True:
      m1 = metadata.entries
      cur = metadata.cursor
      for i in m1:
          if isinstance(i, dropbox.files.FileMetadata):
              flist.append([i.name])
      # flist now has 2000 items
      m2 = client.files_list_folder_continue(cur)
      while m2.has_more == True:
          for i in m2.entries:
              if isinstance(i, dropbox.files.FileMetadata):
                  flist.append([i.name])
          cur = m2.cursor
          m2 = client.files_list_folder_continue(cur)
  </code></pre>
  
  <p>Which gives me a total of 4971 files. But there are 5252 files in a lot of different folders (probably). I am getting a lot of different numbers. Windows gives me 5252 files using console, using the explorer it gives me 2344 files. Unix gives me 5260 files using console and 5288 files using fhe file manager...<br>
  I noticed that a lot of files are missing I added/edited recently (few days ago). After that I tried a slightly different code:</p>
  
  <pre><code>dbx = dropbox.Dropbox("ACCESS_TOKEN")
  result = dbx.files_list_folder("", recursive=True, include_deleted=False, include_media_info=False)
  file_list = []
  
  def process_entries(entries):
      for entry in entries:
          if isinstance(entry, dropbox.files.FileMetadata):
              file_list.append([entry.name])
  
  process_entries(result.entries)
  
  while result.has_more:
      result = dbx.files_list_folder_continue(result.cursor)
      process_entries(result.entries)
  
  print(len(file_list))
  </code></pre>
  
  <p>This code gives me only 1997 files, but the list is containing the new files. I don't get why this is happening, as the two codes are doing the same, but neither is capable of giving me the correct list of files.</p>
  
  <p>Edit: Changed the second code accordingly to Gregs comment. Getting to many files now compared to the synchronized locale Dropbox folder. </p>