Print

Print


OK, the pull request you have will work in all releases prior to R5. In R5 the text changes (which is why text scraping is bad) to one of:
Unable to create directory; directory already exists.
Unable to create new file; file already exists.

So, the line:
if (httpStatusText == "Unable to create new file; file already exists.\n")
won't work. Since you have std:string here why not use:
if (httpStatusText.find("already exists."))

That way you will be immune in case the code doesn't change for R5 to take advantage of the fact the the right error code (kXR_InvalidRequest) will be returned.

I changed the text once I realized it was completely wrong for directories.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/1167#issuecomment-605782769", "url": "https://github.com/xrootd/xrootd/issues/1167#issuecomment-605782769", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1