PowerMeta icon indicating copy to clipboard operation
PowerMeta copied to clipboard

Invalid characters for filenames are not scrubbed

Open egypt opened this issue 7 years ago • 0 comments

Links to download pages instead of direct to a file will look like /view.aspx?src=... which causes an error like this:

Invoke-WebRequest : Cannot perform operation because the wildcard path·
C:\Users\egypt\Desktop\powermeta-data\2018-03-12T11.45.30\view.aspx?src=https%3A%2F%2Fgo.redacted.com%2Frs%2Fredactedinc%2Fimages%2FQ314IndexData.xlsx di
At Z:\repo\PowerMeta\PowerMeta.ps1:479 char:11
+           Invoke-WebRequest $link -UserAgent $UserAgent -UseBasicPars ... 
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (C:\Users\egypt\...4IndexData.xlsx:String) [Invoke-WebRequest], FileNotFoundException
        + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

egypt avatar Mar 12 '18 16:03 egypt