Skip to content

Commit

Permalink
fixed project root path is changed!
Browse files Browse the repository at this point in the history
change Controller prepend_view_path method return value, missing template errors.
  • Loading branch information
songgz authored Jun 1, 2017
1 parent 00fb549 commit e07c38d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/controllers/kindeditor/assets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ def list
return
end

Dir.chdir(Rails.public_path)
upload_path = Rails.public_path
RailsKindeditor.upload_store_dir.split('/').each do |dir|
Dir.mkdir(dir) unless Dir.exist?(dir)
Dir.chdir(dir)
end

Dir.mkdir(@dir) unless Dir.exist?(@dir)

upload_path += dir
Dir.mkdir(upload_path) unless Dir.exist?(upload_path)
end

@root_path += @dir + "/"
@root_url += @dir + "/"

Dir.mkdir(@root_path) unless Dir.exist?(@root_path)

@path = params[:path].strip || ""
if @path.empty?
@current_path = @root_path
Expand Down Expand Up @@ -124,4 +124,4 @@ def show_error(msg)
render :plain => ({:error => 1, :message => msg}.to_json)
end

end
end

1 comment on commit e07c38d

@songgz
Copy link
Author

@songgz songgz commented on e07c38d Nov 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rails root path is changed!

Please sign in to comment.