Skip to content

Commit

Permalink
#169 Bugfix: when initializing solver directories, full paths which i…
Browse files Browse the repository at this point in the history
…ncluded a string matching the source prefix (e.g., CMTSOLUTION) would not be initialized properly. Changed this to only look at file names and exclude those that start with source prefix, not contain. Should be enough to stave off future occurrences of this
  • Loading branch information
bch0w committed Apr 6, 2023
1 parent c39755f commit cb1065a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions seisflows/solver/specfem.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,9 +872,10 @@ def _initialize_working_directory(self, cwd=None):
dst = os.path.join(cwd, "bin", "")
unix.cp(src, dst)

# Copy all input DATA/ files except the source files
# Copy in all input DATA/ file that are not '{source_prefix}*'
src = glob(os.path.join(self.path.specfem_data, "*"))
src = [_ for _ in src if self.source_prefix not in _]
src = [_ for _ in src if not
os.path.basename(_).startswith(self.source_prefix)]
dst = os.path.join(cwd, "DATA", "")
unix.cp(src, dst)

Expand Down

0 comments on commit cb1065a

Please sign in to comment.