MinimServer Forum

Full Version: Directory Name Conflict
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Mac mini, OSX 11.2.3, MinimServer up to date

With content dir:

I get "Directory Name Conflict" error message

I found a workaround, but this is not satisfactory, and it is a real bug as the full path has to be taken into account and not the last part of the path as it seems.

Kind regards
This limitation is by design and dates from the start of MinimServer. The only solution is to rename the last folder in the path so that the final part of this path is different from other contentDir paths.

I thought this was mentioned in the User guide but I haven't been able to find it. I will add it to the Reading audio files section.

This is a bit strange. Maybe I can understand such design when you were starting. But as you definitively need the full path to scan the relevant folders, I have difficulties to understand why this design flaw has been remaining for so many years (I was one of the first Minimserver user many years ago) and why this cannot be corrected (I have been developing software for 30 years).

Kind regards
The name of the last folder is used as a persistent unique identifier for the cache file for the content directory. With your example of content directories of /Volumes/Musique-1/DSF and /Volumes/Musique-2/DSF, both cache files would be named DSF.mcache.

This name is also used as a persistent unique identifier when constructing resource URLs. For example, a file named /Volumes/Musique-1/DSF/myfolder/myfile.flac would have the resource URL http://x.x.x.x:9790/minimserver/*/DSF/myfolder/myfile.flac. These URLs are persistent and should not change if new content directories are added.

It isn't possible to use the full path to name the cache file because '/' isn't a valid character for a filename. Replacing '/' with some other character would work in some but not all cases. For example, replacing '/' with '-' would not work for content directories named /Volumes/Musique-1/DSF and/Volumes/Musique-1-DSF. Similar issues apply when constructing resource URLs.

Using the last folder name and suffixing it with [1], [2], etc. in conflict situations would not work for content directories named /Volumes/Musique-1/DSF and /Volumes/Musique-2/DSF if the user later adds a content directory /Volumes/Musique/DSF[1].

As all alternatives are more complex to explain and implement and don't work for all possible cases, the simple solution of requiring the last folder name to be unique was adopted.
Reference URL's