Path length issue for segment editor extra effects

I’m passing on an issue that @muratmaga experienced at a recent training event, where one of the users found that SegmentEditorExtraEffects would not load unless moved to a shorter path:

Path issues are also very big concern. For example I had a person today which followed our instructions to put the SlicerMorph1-3 on their windows desktop. Everything worked pretty much fine, except SegmentEditorExtraEffects refuse to load the effects (gave a path error). There were no special characters or anything I can find. Unzipping everything to c:\ seemed to fix the issue. For example on my SlicerMorph installation at

C:/Users/Murat/Desktop/SlicerMorph1-3

Some paths are already as long as 169 characters.

C:/Users/Murat/Desktop/SlicerMorph1-3//SlicerMorph1-3-Extensions/SegmentEditorExtraEffects/lib/Slicer-4.11/qt-scripted-modules/SegmentEditorLocalThresholdLib/pycache

Should we be concerned about this?

On Windows, paths should work fine up to 260 characters. If we can confirm that this is an issue for reasonably short installation paths, then we can try to switch to UNC paths (prefixing path by \\?\), which can be up to 32000 characters.

The example above is 169 characters, which means that 90 characters of extra space is available, which is a lot. What was the path on that user’s computer?

People sometimes have multiple levels of directories, so the remaining 90 character can be exceeded by fairly quickly actually (this person for some reason had three levels). In the end Desktop ended up being a poor choice of placement for slicermorph for other reasons as well.

E.g., In windows 10 Home, onedrive may silently take over the users desktop so c:\Users\Murat\Desktop transparently maps to C:\Users\Murat\Onedrive\Desktop on windows shell and explorer.

But as far as I can tell, that behind the scenes translation doesn’t happen for QT dialog boxes. So a user cannot find a data directory that they copied on the desktop, if they go to Add Data button and navigate to the desktop they end up in real desktop location c:\users\murat\desktop, not where data sits c:\users\murat\Onedrive\Desktop).