el_finder 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/el_finder/connector.rb +2 -2
- data/lib/el_finder/pathname.rb +0 -5
- data/lib/el_finder/version.rb +1 -1
- data/test/el_finder/test_pathname.rb +0 -4
- metadata +3 -3
data/lib/el_finder/connector.rb
CHANGED
@@ -306,7 +306,7 @@ module ElFinder
|
|
306
306
|
@response[:error] = 'Invalid Parameters' and return unless @target.file? && @current.directory?
|
307
307
|
@response[:error] = 'Access Denied' and return unless perms_for(@target)[:read] == true && perms_for(@current)[:write] == true
|
308
308
|
@response[:error] = 'No extractor available for this file type' and return if (extractor = @options[:extractors][mime_handler.for(@target)]).nil?
|
309
|
-
cmd = ['cd', @current.shellescape, '&&', extractor.map(&:shellescape), @target.basename.shellescape].flatten.join(' ')
|
309
|
+
cmd = ['cd', @current.to_s.shellescape, '&&', extractor.map(&:shellescape), @target.basename.to_s.shellescape].flatten.join(' ')
|
310
310
|
if system(cmd)
|
311
311
|
@params[:tree] = true
|
312
312
|
_open(@current)
|
@@ -323,7 +323,7 @@ module ElFinder
|
|
323
323
|
extension = archiver.shift
|
324
324
|
basename = @params[:name] || @targets.first.basename_without_extension
|
325
325
|
archive = ElFinder::Pathname.new_with_root(@root, "#{basename}#{extension}").unique
|
326
|
-
cmd = ['cd', @current.shellescape, '&&', archiver.map(&:shellescape), archive.shellescape, @targets.map{|t| t.basename.shellescape}].flatten.join(' ')
|
326
|
+
cmd = ['cd', @current.to_s.shellescape, '&&', archiver.map(&:shellescape), archive.to_s.shellescape, @targets.map{|t| t.basename.to_s.shellescape}].flatten.join(' ')
|
327
327
|
if system(cmd)
|
328
328
|
@response[:select] = [to_hash(archive)]
|
329
329
|
_open(@current)
|
data/lib/el_finder/pathname.rb
CHANGED
data/lib/el_finder/version.rb
CHANGED
@@ -83,10 +83,6 @@ class TestPathname < Test::Unit::TestCase
|
|
83
83
|
|
84
84
|
################################################################################
|
85
85
|
|
86
|
-
def test_shellescape
|
87
|
-
assert_respond_to ElFinder::Pathname.new_with_root(@vroot, 'foo.txt'), :shellescape
|
88
|
-
end
|
89
|
-
|
90
86
|
def test_basename_without_extension
|
91
87
|
file = ElFinder::Pathname.new_with_root(@vroot, 'foo.txt')
|
92
88
|
assert_respond_to file, :basename_without_extension
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: el_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Philip Hallstrom
|