Commit 0e05a4f4 authored by gubala's avatar gubala

better path for create folder

parent b4b58f0d
......@@ -97,8 +97,8 @@ class ApplicationController < ActionController::Base
end
end
def prometheus_path
@path.gsub("gsiftp:/login01.prometheus.cyf-kr.edu.pl/", "prometheus/")
def prometheus_path(path)
@path.gsub("gsiftp://login01.prometheus.cyf-kr.edu.pl/", "prometheus/")
end
private
......
......@@ -147,7 +147,8 @@ class FilesController < ApplicationController
current_user.user_data.save if result
redirect_to folder_path(@path.rpartition('/').first), notice: result ? I18n.t('delete.success') : nil
# redirect_to folder_path(@path.rpartition('/').first), notice: result ? I18n.t('delete.success') : nil
redirect_to folder_path(prometheus_path(@path.rpartition('/').first)), notice: result ? I18n.t('delete.success') : nil
end
......
......@@ -55,7 +55,7 @@ class FoldersController < ApplicationController
logger.info @path
redirect_to folder_path(prometheus_path), notice: result ? I18n.t('folder.success') : nil
redirect_to folder_path(prometheus_path(@path)), notice: result ? I18n.t('folder.success') : nil
end
def mkdir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment