File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ defmodule Scenic.Cache.File do
23
23
images/
24
24
asset.jpg
25
25
26
-
26
+
27
27
At compile time you need to build the actual path of your asset by combining
28
28
the build directory with the partial path inside of `priv/`
29
29
@@ -110,9 +110,10 @@ defmodule Scenic.Cache.File do
110
110
# hashes. Is also slower because it has to load the file and compute the hash
111
111
# to use as a key even it is is already loaded into the cache.
112
112
def load ( path , :insecure , opts ) do
113
- if Mix . env != :test do
114
- IO . puts "WARNING: Cache asset loaded as :insecure \" #{ path } \" "
113
+ if Mix . env ( ) != :test do
114
+ IO . puts ( "WARNING: Cache asset loaded as :insecure \" #{ path } \" " )
115
115
end
116
+
116
117
with { :ok , data } <- read ( path , :insecure , opts ) do
117
118
hash = Hash . binary ( data , opts [ :hash ] || :sha )
118
119
@@ -173,8 +174,9 @@ defmodule Scenic.Cache.File do
173
174
# to use as a key even it is is already loaded into the cache.
174
175
def read ( path , :insecure , opts ) do
175
176
if Mix . env ( ) != :test do
176
- IO . puts "WARNING: Cache asset read as :insecure \" #{ path } \" "
177
+ IO . puts ( "WARNING: Cache asset read as :insecure \" #{ path } \" " )
177
178
end
179
+
178
180
with { :ok , data } <- File . read ( path ) do
179
181
do_unzip ( data , opts )
180
182
else
You can’t perform that action at this time.
0 commit comments