Repository: yt-dlp
Issue: `--write-link` broken on UNC paths
Labels: bug

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm asking a question and **not** reporting a bug or requesting a feature
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I'm running yt-dlp version **2023.01.06** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Please make sure the question is worded well enough to be understood

是否仍然不支持 UNC 路径？
.url 文件无法写入到 UNC 路径
使用 --write-link 选项想生成 .url 文件，但如果使用 -P 选项把文件输出到 UNC 路径，或者就在 UNC 路径命令提示符下下载文件。
结果提示无法写 .url 文件，并且停止后续媒体文件的下载。

Are UNC paths still not supported?
The .url file cannot be written to a UNC path.
Use the --write-link option to generate a .url file, but if you use the -P option to output the file to a UNC path, or download the file at a UNC path command prompt.
The result indicates that the .url file cannot be written and stops downloading subsequent media files.


### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
> yt-dlp -f worst --write-link --no-config https://www.youtube.com/watch?v=yqLlgIaz1L0
[youtube] Extracting URL: https://www.youtube.com/watch?v=yqLlgIaz1L0
[youtube] yqLlgIaz1L0: Downloading webpage
[youtube] yqLlgIaz1L0: Downloading android player API JSON
[info] yqLlgIaz1L0: Downloading 1 format(s): 17
[info] Writing internet shortcut (.url) to: Have you ever seen an atom？ [yqLlgIaz1L0].url
ERROR: Cannot write internet shortcut Have you ever seen an atom？ [yqLlgIaz1L0].url



> yt-dlp -Uvf worst --write-link --no-config https://www.youtube.com/watch?v=yqLlgIaz1L0
[debug] Command-line config: ['-Uvf', 'worst', '--write-link', '--no-config', 'https://www.youtube.com/watch?v=yqLlgIaz1L0']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out gbk (No VT), error utf-8 (No VT), screen gbk (No VT)
[debug] yt-dlp version 2023.01.06 [6becd25] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-7-6.1.7601-SP1 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {'http': 'https://127.0.0.1:8580', 'https': 'https://127.0.0.1:8580'}
[debug] Loaded 1760 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
[youtube] Extracting URL: https://www.youtube.com/watch?v=yqLlgIaz1L0
[youtube] yqLlgIaz1L0: Downloading webpage
[youtube] yqLlgIaz1L0: Downloading android player API JSON
[debug] Loading youtube-nsig.97ea7458 from cache
WARNING: [youtube] yqLlgIaz1L0: Native nsig extraction failed: Trying with PhantomJS
         n = mdPiVBbQB7Ym27 ; player = https://www.youtube.com/s/player/97ea7458/player_ias.vflset/en_US/base.js
[debug] [youtube] Signature function returned an exception; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] yqLlgIaz1L0: Executing signature code
[debug] [youtube] Decrypted nsig mdPiVBbQB7Ym27 => ZG2Z2wwaoqXRJwol=any" "C:\Users\adm
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] yqLlgIaz1L0: Downloading 1 format(s): 17
[info] Writing internet shortcut (.url) to: Have you ever seen an atomERROR: Cannot write internet shortcut Have you ever seen an ato?? [yqLlgIaz1L0].urll
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3083, in _write_link_file
OSError: [Errno 22] Invalid argument: '\\\\?\\\\\\192.168.1.100\\SHARE\\VIDEO\\Have you ever seen an atom？ [yqLlgIaz1L0].url'
```