                                 cb(err)
                             else if stats.ctime > tm
                                 dbg("disk file changed more recently than edits, so loading")
-                                @_load_from_disk(cb)
+                                @_load_from_disk (err, size) =>
+                                    locals.size = size
+                                    cb(err)
                             else
                                 dbg("stick with database version")
                                 cb()

                            dbg("failed -- #{err}")
                            cb(err)
                        else
                            dbg("got it -- length=#{data?.length}")
                            @from_str(data)
                            # we also know that this is the version on disk, so we update the hash
                            @_set_save(state:'done', error:false, hash:misc.hash_string(data))

                @_syncstring_table.wait
                    until : (t) => t.get_one()?.get('init')
                    cb    : (err, init) =>
                        if err
                            @emit('init', err)
                            return
                        init = init.toJS()
                        err  = init.error
                        console.log(err, init, @_patch_list.count(), init.size)
                        if err
                            @emit('init', err)
                            return
                        if @_client.is_user() and @_patch_list.count() == 0 and (init.size ? 0) > 0
                            # wait for a change -- i.e., project loading the file from
                            # disk and making available...  Because init.size > 0, we know that
                            # there must be SOMETHING in the patches table once initialization is done.
                            # This is the root cause of https://github.com/sagemathinc/cocalc/issues/2382
                            @_patches_table.once 'change', =>
                                @emit('init')
                        else
                            @emit('init')
                if err
                    cb(err)
                else
