Skip to content

Commit

Permalink
Move/rename dirs now works recoursively to keep the cache updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
danilop committed Jun 17, 2014
1 parent a50b430 commit be2adb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yas3fs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1934,11 +1934,11 @@ def rename_path(self, path, new_path):
self.rename_item(path, new_path, dir=True)

def rename_item(self, path, new_path, dir=False):
logger.debug("rename_iten '%s' -> '%s' dir?%s" % (path, new_path, dir))
logger.debug("rename_item '%s' -> '%s' dir?%s" % (path, new_path, dir))
source_path = path
target_path = new_path
self.cache.rename(source_path, target_path)
key = self.get_key(source_path)
self.cache.rename(source_path, target_path)
if key: # For files in cache or dir not on S3 but still not flushed to S3
self.cache.inc(source_path, 'deleted')
self.rename_on_s3(key, source_path, target_path, dir)
Expand Down

0 comments on commit be2adb2

Please sign in to comment.