Added projects. Part 7

This commit is contained in:
alexey
2025-03-01 23:38:05 +03:00
parent c61763ba56
commit ffe340bcae
5 changed files with 137 additions and 8 deletions

View File

@@ -24,3 +24,9 @@ def check_partname_in_array(filename, search_array)
end
fnd
end
def check_safe_path(filename)
current_dir = Dir.pwd
home_dir = Dir.home
filename.start_with?("/etc/mock") || filename.start_with?(current_dir) || filename.start_with?(home_dir)
end