a DOgG @sddZddZdS)cCsddl}ddl}|dd}d|vr\|dddkr@|dd}|d}|jd|S|d}t|dks|dd |jvrd |}t ||dd  }|d d}|d}|D]}|r|d|j|}q| dr| dr|d7}|S) N:|z/////\z Bad URL: ) string urllib.parsereplacesplitparseunquotejoinlen ascii_lettersOSErrorupperendswith)urlr urllib componentscomperrordrivepathr"/usr/lib64/python3.9/nturl2path.py url2pathnames(     rcCs4ddl}|dddkrf|dd}|dddkrJd|dd}n|dddkrftd |d|vr|ddd krd |}|d}|jd |S|jddd }t|dkst|ddkrd |}t||j|d}|dd}d |d}|D] }|r|d |j|}q|S)Nrrz\\?\zUNC\rr rrz Bad path: z\\r)maxsplitz///)r rrr rquoterr)prrrrrrrrr pathname2url-s.    r#N)rr#rrrrs%