Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Directory Name Conflict
14-09-2021, 18:10
Post: #1
Directory Name Conflict
Hi

Mac mini, OSX 11.2.3, MinimServer up to date

With content dir:
/Volumes/Musique-1/DSF
/Volumes/Musique-2/DSF

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
Thierry
Find all posts by this user
Quote this message in a reply
14-09-2021, 20:41
Post: #2
RE: Directory Name Conflict
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.
Find all posts by this user
Quote this message in a reply
15-09-2021, 02:36
Post: #3
RE: Directory Name Conflict
Hi

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
Thierry
Find all posts by this user
Quote this message in a reply
15-09-2021, 08:13 (This post was last modified: 15-09-2021 09:11 by simoncn.)
Post: #4
RE: Directory Name Conflict
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)