aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fpm/cmd/new.f905
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fpm/cmd/new.f90 b/src/fpm/cmd/new.f90
index 0afe651..abc1d67 100644
--- a/src/fpm/cmd/new.f90
+++ b/src/fpm/cmd/new.f90
@@ -589,6 +589,11 @@ character(len=*),intent(in) :: filename
integer :: lun
character(len=8) :: date
+ if(exists(filename))then
+ write(stderr,'(*(g0,1x))')'<INFO> ',filename,&
+ & 'already exists. Not overwriting'
+ return
+ endif
!> get date to put into metadata in manifest file "fpm.toml"
call date_and_time(DATE=date)
table = toml_table()