diff --git a/earthaccess/auth.py b/earthaccess/auth.py index 8e89cbdc..bd7924f7 100644 --- a/earthaccess/auth.py +++ b/earthaccess/auth.py @@ -373,7 +373,7 @@ def _persist_user_credentials(self, username: str, password: str) -> bool: my_netrc["urs.earthdata.nasa.gov"] = {"login": username, "password": password} my_netrc.save() urs_cookies_path = Path.home() / ".urs_cookies" - if not usr_cookies_path.exists(): + if not urs_cookies_path.exists(): urs_cookies_path.write_text("") # Create and write to .dodsrc file @@ -383,7 +383,7 @@ def _persist_user_credentials(self, username: str, password: str) -> bool: dodsrc_path.write_text(dodsrc_contents) - if platform.system() == "Windows": + if platform.system() == "Windows": local_dodsrc_path = Path.cwd() / dodsrc_path.name if not local_dodsrc_path.exists(): shutil.copy2(dodsrc_path, local_dodsrc_path)