Paths are always converted to lowercase even if the option is disabled in general settings

Issue #1850 resolved
Ben ny created an issue

Hi,

when importing files it always converts the path to lowercase, making it pretty much impossible to use the plugin on Linux. Toggling ‘case sensitive paths’ in the global settings doesn’t affect the behavior as it used to.

Thanks

Comments (12)

  1. Thomas Larsson repo owner

    I don’t have access to Linux anymore and cannot do proper testing, but I found some things that have been fixed.

    Even if Windows isn’t case sensitive, Python is, and therefore the plugin needs to convert file paths to a canonical form internally. To go from the canonical (lowercase) form to the actual file path under Linux, the plugin uses a lookup table that is stored in the file “DAZ Importer/import_daz_scanned_absolute_paths.json”. This file is generated with the Utilities > Scan Absolute Paths button. Note that you need to rescan the database every time you have added new assets to DS.

    Having to scan the database is a nuisance, but once it is done things should work better than before, since the plugin should still find files even if they are located in differently cased folders. But as I said, I don’t have Linux and cannot test properly.

  2. Ben ny reporter

    scanning the absolute paths did fix it for me. Thanks wasn’t aware of it’s necessity. (just updating the plugin to the current commit didn’t fix it, so eventually i did send you on a goose chase, sorry for that)

  3. Thomas Larsson repo owner

    The plugin interacts with the file system not only when it imports scenes, but also e.g. when morphs are imported. I have been looking at the code and attempt to make sure that all file access is done using the same functions, where case-sensitive paths are handled. Except where a file selector is used.

    There is a new blog post on this: https://diffeomorphic.blogspot.com/2023/11/linux-revisited.html.

  4. Thomas Larsson repo owner

    When I was using Linux I had a lot of problems with duplicate directories. DS under Wine usually found the file paths, unless there were multiple directories with the same case-insensitive names. E.g., if both “/runtime/textures” and “/Runtime/Textures” existed, DS only found one of them.

  5. Ben ny reporter

    Thomas, Ben, I am not a linux user so can’t tell, but it seems wine already implements case-insensitive files, perhaps it’s just some settings to turn on.

    The issue here is not Wine. Linux users usually run DAZ in Wine, and Blender native on Linux, linked to the same path as the DAZ Library (since all the wine stuff is on a normal Linux filesystem).

    And yea Thomas, that’s an annoying issue, so i wrote myself a script to ensure that each path only exists once.

  6. Chris R

    Even tho i for myself haven’t had any issues in a long time, is there something we can do to aid you with Linux support? Anything to keep an eye on and report back to you?

  7. Log in to comment