Project

General

Profile

« Previous | Next » 

Revision a9154cfb

Added by Alexis Mousset over 7 years ago

Fixes #9500: copyGitFile reports an error when destination is a symbolic link

View differences:

techniques/fileDistribution/copyGitFile/2.0/copyFileFromSharedFolder.st
}&
"shared_folder" string => "&SHARED_FILES_FOLDER&";
"canon_dirname_${index}" string => canonify(dirname("${copyfile[${index}][destination]}"));
"index" slist => getindices("copyfile");
iteration_1::
......
methods:
"any" usebundle => file_check_symlink(dirname("${copyfile[${index}][destination]}"));
pass3.(!is_valid)::
"any" usebundle => rudder_common_report("copyFile", "result_error", "${copyfile[${index}][uuid]}", "Copy file", "${copyfile[${index}][name]}", "There is no shared folder on the Rudder Server, so it's not possible to copy a file from it");
......
# Error conditons
## The destination is not an existing directory
## The destination is not an existing directory or symbolic link
"any" usebundle => rudder_common_report("copyFile", "result_error", "${copyfile[${index}][uuid]}", "Copy file", "${copyfile[${index}][name]}", "The copy of the file failed: the destination (${copyfile[${index}][destination]}) is not stored in a valid directory"),
ifvarclass => "copy_file_${index}_dest_notdir";
ifvarclass => "copy_file_${index}_dest_notdir.file_check_symlink_${canon_dirname_${index}}_failed";
## File access denied
"any" usebundle => rudder_common_report("copyFile", "result_error", "${copyfile[${index}][uuid]}", "Copy file", "${copyfile[${index}][name]}", "The copy of the file failed: access to ${copyfile[${index}][name]} denied by the server"),
techniques/fileDistribution/copyGitFile/2.1/copyFileFromSharedFolder.st
}&
"shared_folder" string => "&SHARED_FILES_FOLDER&";
"canon_dirname_${index}" string => canonify(dirname("${copyfile[${index}][destination]}"));
"index" slist => getindices("copyfile");
iteration_1::
......
methods:
"any" usebundle => file_check_symlink(dirname("${copyfile[${index}][destination]}"));
pass3.(!is_valid)::
"any" usebundle => rudder_common_report("copyFile", "result_error", "${copyfile[${index}][uuid]}", "Copy file", "${copyfile[${index}][name]}", "There is no shared folder on the Rudder Server, so it's not possible to copy a file from it");
......
# Error conditons
## The destination is not an existing directory
## The destination is not an existing directory or symbolic link
"any" usebundle => rudder_common_report("copyFile", "result_error", "${copyfile[${index}][uuid]}", "Copy file", "${copyfile[${index}][name]}", "The copy of the file failed: the destination (${copyfile[${index}][destination]}) is not stored in a valid directory"),
ifvarclass => "copy_file_${index}_dest_notdir";
ifvarclass => "copy_file_${index}_dest_notdir.file_check_symlink_${canon_dirname_${index}}_failed";
## File access denied
"any" usebundle => rudder_common_report("copyFile", "result_error", "${copyfile[${index}][uuid]}", "Copy file", "${copyfile[${index}][name]}", "The copy of the file failed: access to ${copyfile[${index}][name]} denied by the server"),

Also available in: Unified diff