cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 

listDatastoreInfo.mtime can be nil

Caram New member | Level 1
New member | Level 1

I have this issue where datastoreInfo.mtime is nil for some of my datastores. I would expect that it can never be nil. This is all the more curious that datastore.mtime is never nil for the same datastore. This makes the mtime attribute unrealiable to use.

I have had this issue for several months now but never got round to reporting it/examining it deeply.

Caram

(main)> store
=> #<DBDatastore:0x111ea5680>
(main)> store.mtime
=> 2015-02-14 22:20:08 +0100
(main)> store.manager.listDatastoreInfo(nil).select{ |id, info| info.mtime == nil }.values.first.mtime
=> nil

iOS 8.1.3
XCode 6.1
SDK 3.1.2

3 Replies 3

Re: listDatastoreInfo.mtime can be nil

Dropboxer
Dropboxer

The mtime on both DBDatastore and DBDatastoreInfo can be nil, per the documentation:

https://www.dropbox.com/developers/datastore/docs/ios#DBDatastore.mtime :

The last modified time for this datastore, or nil if no data has been synced yet.

https://www.dropbox.com/developers/datastore/docs/ios#DBDatastoreInfo.mtime :

The last modified time for this datastore, or nil if none is set.

The fact that one is nil when the other isn't though is a little surprising. When does this happen exactly? Can you supply some sample code?

Also, are you sure you're looking at the same datastore in your output here? That is, store.mtime, is referring to a specific datastore, but store.manager.listDatastoreInfo(nil).select... seems to be looking for any DBDatastoreInfo where mtime is nil.

Re: listDatastoreInfo.mtime can be nil

Caram New member | Level 1
New member | Level 1

Greg, yeap they are the same datastores; I did check, even though did not report all the command lines here. Sorry no sample code but the entire app, difficult to know when and why it did occur, but the result is still visible today in some datastore.

Is there anything I could to to provide you with more information for this datastore?

I would suspect a datastore and listDatastoreInfoare not looking at the same data struture and for some reason, in some unfortunate corner case, the time attribute does not get copied across. But obviously I don't have the code to check this out.

Re: listDatastoreInfo.mtime can be nil

Dropboxer
Dropboxer

Thanks Caram. Some sample code and steps to reproduce this would be helpful. Also, sample output showing this happening with the same datastore, e.g., with a specific ID, may be useful.

Anyway, since both of these can be nil, is it possible you're somehow just catching this before it was propagated to both places? When is this happening? I.e., when are you catching it in the debugger (per your above output)?

Also, just to confirm, you are always looking at mtime and not "time", right? I just ask because you said "time" in your original question (which I fixed) but you did it again in this followup.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?