fix: Windows-only: "add to hfs" fails for "timeout" sometimes
Massimo Melina committed
Jan 2, 2026 at 12:07 UTC
a5dc84e4cc477ccdc9d9ee6be464d9ae7f52f140
1 file changed
+1
-1
src/api.vfs.ts
+1
-1
@@ -248,7 +248,7 @@ export default {
248
$j = [System.Text.Encoding]::UTF8.GetBytes($j);
249
${useHttp ? '' : '[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}'}
250
try {
251
- $res = Invoke-WebRequest -Uri '${url}/~/api/add_vfs' -UseBasicParsing -Method POST -Headers @{ 'x-hfs-anti-csrf' = '1' } -ContentType 'application/json' -TimeoutSec 2 -Body $j;
251
+ $res = Invoke-WebRequest -Uri '${url}/~/api/add_vfs' -UseBasicParsing -Method POST -Headers @{ 'x-hfs-anti-csrf' = '1' } -ContentType 'application/json' -TimeoutSec 3 -Body $j;
252
$json = $res.Content | ConvertFrom-Json; $link = $json.link; $link | Set-Clipboard;
253
$wsh.Popup('The link is ready to be pasted');
254
} catch { $wsh.Popup($_.Exception.Message + ' – ' + '${url}', 0, 'Error', 16); }"`)