carrierwave 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/carrierwave.rb
CHANGED
|
@@ -70,8 +70,16 @@ module CarrierWave
|
|
|
70
70
|
#
|
|
71
71
|
def delete_cache_id
|
|
72
72
|
if @cache_id
|
|
73
|
-
path = File.join(cache_dir, @cache_id)
|
|
74
|
-
|
|
73
|
+
path = File.expand_path(File.join(cache_dir, @cache_id), CarrierWave.root)
|
|
74
|
+
begin
|
|
75
|
+
Dir.rmdir(path)
|
|
76
|
+
rescue Errno::ENOENT
|
|
77
|
+
# Ignore: path does not exist
|
|
78
|
+
rescue Errno::ENOTDIR
|
|
79
|
+
# Ignore: path is not a dir
|
|
80
|
+
rescue Errno::ENOTEMPTY, Errno::EEXIST
|
|
81
|
+
# Ignore: dir is not empty
|
|
82
|
+
end
|
|
75
83
|
end
|
|
76
84
|
end
|
|
77
85
|
|
data/lib/carrierwave/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: carrierwave
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 7
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 5
|
|
9
|
-
-
|
|
10
|
-
version: 0.5.
|
|
9
|
+
- 6
|
|
10
|
+
version: 0.5.6
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jonas Nicklas
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-07-
|
|
18
|
+
date: 2011-07-12 00:00:00 -05:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|