-
Notifications
You must be signed in to change notification settings - Fork 491
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
directoryLabel leading '.' char for hidden directories is ignored (removed) #8807
Comments
For the record: Same thing appears to happen at demo.dataverse.org with slightly newer dataverse. |
Hat tip to @qqmyers for pointing me in the right direction. The problem is in dataverse/src/main/java/edu/harvard/iq/dataverse/util/StringUtil.java Lines 177 to 179 in 4686066
@landreev @sekmiller according to There is a parameterized test that also demonstrates the experienced behavior is as designed.
|
Here's the release note from 4.12: https://github.com/IQSS/dataverse/releases/tag/v4.12 A note on folder names:In this release users are given an option to edit the folder names in the file metadata. Strict validation rules for the folder names are also introduced. Only the following characters are allowed: the alphanumerics, '_', '-', '.' and ' ' (white space). Some datafiles in your Dataverse may already have folder names saved in the database (if they were extracted from uploaded zip archives with folder structure). The following sanitizing rules will be applied to all the existing folder names in the database: any invalid characters will be replaced by the '.' character. Any sequences of dots will be further replaced with a single dot. For example, the folder name data&info/code=@137 will be converted to data.info/code.137. This update will be automatically applied to the database the first time this release is deployed. From the above it seems like period/dot/full stop/ As observed in this issue it seems like leading periods are disallowed. This is reflected not only in the code above but in the SQL update script in the pull request above:
|
If we supported dot directories like Besides, it would be generally useful as well, of course! 😄 Reading my comment above, I'm wondering if dot directories are already supported. 🤔 We should re-test. |
@pdurbin |
@landreev it sounds like you looked at the code. Great. Yes, we should stop removing the initial |
What steps does it take to reproduce the issue?
Crate a new file in a dataset with directoryLabel starting with '.' char. And save the file.
When does this issue occur?
Issue occurs when adding files in hidden directories on top level. Hidden directories inside other directories work.
Which page(s) does it occurs on?
Upload dataverse files (API and webinterface)
What happens?
The leading '.' char is ignored / removed. For example adding
.hidden/file
will be saved ashidden/file
.To whom does it occur (all users, curators, superusers)?
all users
What did you expect to happen?
Adding
.hidden/file
should be saved in a hidden directory named.hidden
Which version of Dataverse are you using?
v. 5.9 build 750-fb24c87
Any related open or closed issues to this bug report?
datalad/datalad-dataverse#83
Screenshots:
The text was updated successfully, but these errors were encountered: