Forum Discussion

brettb__'s avatar
brettb__
New member | Level 2
5 years ago

Sharing folder changes folder to lowercase

I have python script, which in part shares folders. Sometimes (not always) the casing of the folder gets changed. The API move_v2 doesn't allow renaming by case only, so am I just stuck with automatically renamed folders? Is there any way to prevent this behavior in the future?

 

Sharing:   /root/SHARE TARGET

 

Changes to:   /root/share target

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Thanks for the post. Unfortunately, that behavior is expected sometimes, and there isn't a way to just prevent it. The original casing isn't always available for all components. There's a note about this in the API v2 documentation, under "Case insensitivity":

    Also, while Dropbox is case-insensitive, it makes efforts to be case-preserving. Metadata.name will contain the correct case. Metadata.path_display usually will contain the correct case, but sometimes only in the last path component. If your app needs the correct case for all path components, it can get it from the Metadata.name or last path component of each relevant Metadata.path_display entry.

    (That's referring to the Metadata objects in particular, but it applies anywhere file metadata, e.g., paths, are used.)

    We understand this is non-ideal of course, and I'll forward this on to the team as feedback, but I can't make any promises as to if or when this might be improved in the future.