Skip to content

Commit

Permalink
51629: On a windows system, transform scripts with backslashes should…
Browse files Browse the repository at this point in the history
… be handled better
  • Loading branch information
labkey-klum committed Nov 8, 2024
1 parent c30f7a3 commit 0ae033d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/src/org/labkey/api/qc/TsvDataSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,14 @@ else if (Collection.class.isAssignableFrom(o.getClass()))
else if (Object[].class.isAssignableFrom(o.getClass()))
pw.append(StringUtils.join((Object[]) o, ","));
else
pw.append(String.valueOf(o));
{
String val = String.valueOf(o);
// double quote the value if it contains backslashes to avoid tab loader mangling
// on import
if (val.contains("\\"))
val = "\"" + val + "\"";
pw.append(val);
}
}
sep = "\t";
}
Expand Down

0 comments on commit 0ae033d

Please sign in to comment.