-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1545648: Fix PUT command error if file path contains spaces and single quotes #1066
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1066 +/- ##
==========================================
+ Coverage 86.23% 86.30% +0.06%
==========================================
Files 121 121
Lines 11845 11849 +4
Branches 1212 1213 +1
==========================================
+ Hits 10215 10226 +11
+ Misses 1338 1334 -4
+ Partials 292 289 -3 ☔ View full report in Codecov by Sentry. |
…nector-net into SNOW-1545648-PUT-Space-Error
…nector-net into SNOW-1545648-PUT-Space-Error
{ | ||
// Extract file path from PUT command: | ||
// E.g. "PUT file://C:<path-to-file> @DB.SCHEMA.%TABLE;" | ||
int startIndex = query.IndexOf("file://") + "file://".Length; | ||
int endIndex = query.Substring(startIndex).IndexOf('@') - 1; | ||
string filePath = query.Substring(startIndex, endIndex); | ||
string filePath = query.Substring(startIndex, endIndex).Trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe TrimEnd() would be better because we just want to trim trailing spaces.
Description
Fix PUT command error if file path contains spaces and single quotes
Checklist
dotnet test
)