
    /d                         d dl Z d dlZd dlZd Zd Zd Zd ZeZd Zd Z	 e
                                d ej                    z   e          Z e
                                d	 ej                    z   e	          ZdS )
    Nc                  b    t           j                            t           j        d         d          S )NUSERPROFILEzLocal Settings)ospathjoinenviron     6lib/python3.11/site-packages/keyring/util/platform_.py_settings_root_XPr      s     7<<
=13CDDDr
   c                  ~    t           j                            dt           j                            dd                    S )NLOCALAPPDATAProgramData.)r   r   getr	   r
   r   _settings_root_Vistar   
   s(    :>>."*..*L*LMMMr
   c                      t          j                    \  } }}}| dk    rt                      nt                      }t          j                            |d          S )NXPzPython Keyring)platform	win32_verr   r   r   r   r   )releaseversioncsdptyperoots        r   _data_root_Windowsr      sQ    #+#5#7#7 GWc5")T/M7K7M7MD7<<.///r
   c                      t           j                                        dz  } t          j                            dd          p| }t          j                            |d          S )zW
    Use freedesktop.org Base Dir Specification to determine storage
    location.
    z.local/shareXDG_DATA_HOMENpython_keyring)pathlibPathhomer   r   r   r   r   )fallbackr   s     r   _data_root_Linuxr$      sM    
 |  ""^3H:>>/400<HD7<<.///r
   c                     d t                      d<   t          j                            t	                      d          } t          j                            t                      d          }t          j                            |          r7t          j                            |           sd| d|  d}t          |          dS dS )a  
    Prior versions of keyring would search for the config
    in XDG_DATA_HOME, but should probably have been
    searching for config in XDG_CONFIG_HOME. If the
    config exists in the former but not in the latter,
    raise a RuntimeError to force the change.
    c                      d S )Nr	   r	   r
   r   <lambda>z(_check_old_config_root.<locals>.<lambda>*   s    $ r
   _check_old_config_rootzkeyringrc.cfgz/Keyring config exists only in the old location z and should be moved to z& to work with this version of keyring.N)globalsr   r   r   _config_root_Linuxr$   isfileRuntimeError)config_file_newconfig_file_oldmsgs      r   r(   r(   !   s     +7,GII&'gll#5#7#7IIOgll#3#5#5GGO	w~~o&&  rw~~o/N/N  44 48G4 4 4 	
 3       r
   c                      t                       t          j                                        dz  } d}t          j                            |d          p| }t          j                            |d          S )zV
    Use freedesktop.org Base Dir Specification to determine config
    location.
    z.configXDG_CONFIG_HOMENr   )	r(   r    r!   r"   r   r   r   r   r   )r#   keyr   s      r   r*   r*   6   s^    
 |  ""Y.H
C:>>#t$$0D7<<.///r
   _data_root__config_root_)r   r   r    r   r   r   r$   _config_root_Windowsr(   r*   r)   r   system	data_rootconfig_rootr	   r
   r   <module>r9      s    				  E E EN N N0 0 00 0 0 *      *	0 	0 	0 GIIMM-/(/*;*;;=MNN	giimmOoho.?.??ASTTr
   