diff --git a/augpathlib/caches.py b/augpathlib/caches.py index ffd1703..80493f1 100644 --- a/augpathlib/caches.py +++ b/augpathlib/caches.py @@ -100,6 +100,7 @@ def __init__(self, *args, meta=None, remote=None, **kwargs): self._meta_updater(meta) else: if self.meta is None: + delattr(self._local, '_cache') raise exc.NoCachedMetadataError(self.local) super().__init__() diff --git a/augpathlib/core.py b/augpathlib/core.py index 8477199..03abb88 100644 --- a/augpathlib/core.py +++ b/augpathlib/core.py @@ -594,6 +594,7 @@ def data(self): def data(self, generator): if self.cache is not None: cmeta = self.cache.meta + # FIXME do we touch a file, write the meta # and then write the data? # do we touch a temporary file, write the meta