Skip to content

Conversation

@vagisha
Copy link
Collaborator

@vagisha vagisha commented Feb 17, 2025

Rationale

Non-ASCII characters were not getting percent encoded in the dataFileUrl set on the ExpData associated with .skyd files.
As a result, in folder paths that contain non-ASCII characters, two rows were being created in ExpData for a .skyd file. One with un-encoded characters and a second with a fully percent-encoded dataFileUrl.
Example:

  • file:///data/labkey/files/00Developer/vsharma/Issues/FilePathRootTest%20Project%20☃~!@$&()_+%7B%7D-=%5B%5D,.%23äöüÅ/Source%20Folder/@files/MRMer/MRMer.skyd
  • file:///data/labkey/files/00Developer/vsharma/Issues/FilePathRootTest%20Project%20%E2%98%83~!@$&()_+%7B%7D-=%5B%5D,.%23%C3%A4%C3%B6%C3%BC%C3%85/Source%20Folder/@files/MRMer/MRMer.skyd

This was causing a pipeline job error when moving a Skyline document across folders. It also caused the test added in LabKey/MacCossLabModules#502 to fail, due to the pipeline job error, when running on TeamCity.

NOTE: Path.toUri() has platform specific behavior, it seems. On my Windows machine, Path.toUri() does not percent-encode special characters. As a result, File.toURI() and Path.toUri () end up producing the same percent-encoded values. That is why the move pipeline job and test succeed locally, but fail on TeamCity where File.toURI() and Path.toUri() produce different percent encoding.

Related Pull Requests

Changes

  • Use Path.toUri() instead of File.toURI() when setting the dataFileUrl on ExpData for a skyd file

@labkey-jeckels labkey-jeckels merged commit c1cbc00 into release24.11-SNAPSHOT Feb 18, 2025
5 of 6 checks passed
@labkey-jeckels labkey-jeckels deleted the 24.11_fb_fix-filepathroot-on-move-run branch February 18, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants