mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 13:41:41 +00:00
fix: no devolver 'true' si no existe el archivo
closes #9380 closes #9379 closes #9375 closes #9374 closes #9366 closes #8888 closes #8765 closes #8764 closes #8674 closes #8099 closes #8098 closes #7845 closes #7844 closes #7612 closes #7611 closes #9378 closes #9377 closes #9364 closes #9362
This commit is contained in:
parent
581e8e10c2
commit
53b11cba15
1 changed files with 7 additions and 0 deletions
|
@ -122,10 +122,17 @@ class MetadataFile < MetadataTemplate
|
|||
Pathname.new(value['path'])
|
||||
end
|
||||
|
||||
# Obtener la ruta relativa al sitio.
|
||||
#
|
||||
# Si algo falla, devolver la ruta original para no romper el archivo.
|
||||
#
|
||||
# @return [String, nil]
|
||||
def relative_destination_path_with_filename
|
||||
destination_path_with_filename.relative_path_from(Pathname.new(site.path).realpath)
|
||||
rescue ArgumentError => e
|
||||
ExceptionNotifier.notify_exception(e, data: { site: site.name, path: value['path'] })
|
||||
|
||||
value['path']
|
||||
end
|
||||
|
||||
def static_file_path
|
||||
|
|
Loading…
Reference in a new issue