Commit e9e7f3aa authored by Frank Bergmann's avatar Frank Bergmann

- Moved code from intranet-defs-procs into:

  - intranet-csv-procs.tcl and
  - intranet-system-procs.tcl
- Eliminated im_filestorage_find_cmd and replaced by the plain string "find"
  for most im_execs. im_exec should take care of locating the find command
parent 8d36610e
......@@ -359,18 +359,16 @@ ad_proc -public im_filestorage_find_files { project_id } {
Returns a list of files in a project directory
} {
set project_path [im_filestorage_project_path $project_id]
set find_cmd [im_filestorage_find_cmd]
if { [catch {
ns_log Notice "im_filestorage_find_files: Checking $project_path"
file mkdir $project_path
im_exec chmod ug+w $project_path
set file_list [im_exec $find_cmd $project_path -noleaf -type f]
set file_list [im_exec find $project_path -noleaf -type f]
} err_msg] } {
# Probably some permission errors - return empty string
ns_log Error "im_filestorage_find_files: 'file mkdir $project_path; chmod ug+w $project_path; $find_cmd $project_path -noleaf -type f' failed with error: err_msg=$err_msg\n"
ns_log Error "im_filestorage_find_files: 'file mkdir $project_path; chmod ug+w $project_path; find $project_path -noleaf -type f' failed with error: err_msg=$err_msg\n"
set file_list ""
}
......@@ -1549,8 +1547,6 @@ ad_proc -public im_filestorage_base_component { user_id object_id object_name ba
set bgcolor(0) "roweven"
set bgcolor(1) "rowodd"
set find_cmd [im_filestorage_find_cmd]
set current_url_without_vars [ns_conn url]
set user_id [auth::require_login]
......@@ -1614,7 +1610,7 @@ ad_proc -public im_filestorage_base_component { user_id object_id object_name ba
# Executing the find command
file mkdir $find_path
im_exec chmod ug+w $find_path
set file_list [im_exec $find_cmd $find_path -noleaf]
set file_list [im_exec find $find_path -noleaf]
set files [lsort [split $file_list "\n"]]
} err_msg] } {
ns_log Error "im_filestorage_base_component: find_path=$find_path, err_msg=$err_msg"
......
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