diff mbox series

[bug#46715] guix import: Fixing detection of Fortran files.

Message ID 20210223110021.10765-1-madalinionel.patrascu@mdc-berlin.de
State New
Headers show
Series [bug#46715] guix import: Fixing detection of Fortran files. | expand


Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Mădălin Ionel Patrașcu Feb. 23, 2021, 11 a.m. UTC
This fixes a bug whereby Guix importer considers files like .f.*
being Fortran's files.

(find-files dir "\\.f(90|95)?")

would consider a lot of files with an extension starting with f
being a Fortran file. The right way is to consider only files
ending with .f90 or .f95.

*guix/import/cran.scm: changing pattern of the detection for
Fortran's files to .f(90|95)$.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
 guix/import/cran.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index e8caf080fd..dbc858cb84 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -361,7 +361,7 @@  empty list when the FIELD cannot be found."
 (define (directory-needs-fortran? dir)
   "Check if the directory DIR contains Fortran source files."
-  (match (find-files dir "\\.f(90|95)?")
+  (match (find-files dir "\\.f(90|95)$")
     (() #f)
     (_ #t)))