Skip to content

Commit

Permalink
Prevent multiple copies of a directory being added to global_cache_dirs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 607046305
  • Loading branch information
SeqIO Team authored and SeqIO committed Feb 20, 2024
1 parent ec01ba8 commit ff8c0a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions seqio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ def set_global_cache_dirs(global_cache_dirs):


def add_global_cache_dirs(global_cache_dirs):
global _GLOBAL_CACHE_DIRECTORIES
_GLOBAL_CACHE_DIRECTORIES += global_cache_dirs
for cache_dir in global_cache_dirs:
if cache_dir not in _GLOBAL_CACHE_DIRECTORIES:
_GLOBAL_CACHE_DIRECTORIES.append(cache_dir)



Expand Down

0 comments on commit ff8c0a0

Please sign in to comment.