mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b8837066dc
1. When comparing the directory to delete against the top level cache_path, use File.realpath to make sure we aren't comparing two unequal strings that point to the same path. This occurs, for example, when cache_path has a trailing slash, which it does in the default Rails configuration. Since the input to delete_empty_directories never has a trailing slash, the comparison will never be true and the top level cache directory (and above) may be deleted. However… 2. File.delete raises EPERM when trying to delete a directory, so no directories have ever been deleted. Changing the code to Dir.delete fixes that. |
||
---|---|---|
.. | ||
strategy | ||
file_store.rb | ||
mem_cache_store.rb | ||
memory_store.rb | ||
null_store.rb |