summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgis Anastasopoulos <corestudiosinc@gmail.com>2016-05-12 12:16:09 +0300
committerAgis Anastasopoulos <corestudiosinc@gmail.com>2016-05-12 12:43:09 +0300
commit59b2ea2b1c486e1c283544b2dfc1ba5d63870533 (patch)
treef17d4a2deb21ed83911f914dab9366f23f99355e
parent862dd8f5be93dcf03e0954d5a6e725d1556737fd (diff)
downloadbundler-issue-4534.tar.gz
Wrap file operation with #filesystem_accessissue-4534
Closes #4534.
-rw-r--r--lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
index f19b1df3d7..c3725a59a8 100644
--- a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
+++ b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
@@ -41,7 +41,10 @@ class Bundler::CompactIndexClient
end
mode = response.is_a?(Net::HTTPPartialContent) ? "a" : "w"
- local_path.open(mode) {|f| f << content }
+
+ Bundler::SharedHelpers.filesystem_access(local_path) do
+ local_path.open(mode) {|f| f << content }
+ end
response_etag = response["ETag"]
return if etag_for(local_path) == response_etag