Closed espadrine closed 11 years ago
If I understand correctly, calling file.writeMeta
will call driver.dumpMeta
and then resetType
. This will then in turn call driver.loadMeta
, try to guessType
or default to binary (always overwriting the previous type), and then call file.writeMeta
again if file.meta.type
of file.meta['Last-Modified']
are undefined, restarting from the beginning.
Won't that recurse unnecessarily? Aren't we risking infinite callback loops? Why overwrite the file's type every time you write metadata to disk?
Won't that recurse unnecessarily? Aren't we risking infinite callback loops? Why overwrite the file's type every time you write metadata to disk?
From what you said, we'll always end up with a file.meta.type
set, won't we? And it will be set once for every file anyway. Unless another program systematically resets the metadata file, it won't loop indefinitely.
Great, thanks!
@jankeromnes, want to take a stab at a review?