@@ -164,17 +164,35 @@ export default defineComponent({
164164
165165 const getSambaPath = (path : string ) => {
166166 const pathMappings = {
167- user: ' \\\\ cernbox-smb\\ eos\\ user\\ ' ,
168- project: ' \\\\ cernbox-drive\\ project\\ ' ,
169- winspaces: ' \\\\ cernbox-drive\\ winspaces\\ ' ,
170- media: ' \\\\ cernbox-drive\\ eos\\ ' ,
171- public: ' \\\\ cernbox-drive\\ eos' ,
172- }
173- const pathComponents = path ?.split (' /' ).filter (Boolean )
174- if (pathComponents .length > 1 && pathComponents [0 ] === ' eos' ) {
175- const translated = pathMappings [pathComponents [1 ]]
176- return translated && ` ${translated }${pathComponents .slice (2 ).join (' \\ ' )} `
167+ eos: {
168+ user: ' \\\\ cernbox-smb\\ eos\\ user\\ ' ,
169+ project: ' \\\\ cernbox-drive\\ project\\ ' ,
170+ ams: ' \\\\ cernbox-drive\\ eosams\\ ' ,
171+ opendata: ' \\\\ cernbox-drive\\ eosopendata\\ ' ,
172+ theory: ' \\\\ cernbox-drive\\ eostheory\\ ' ,
173+ media: ' \\\\ cernbox-drive\\ eosmedia\\ ' ,
174+ web: ' \\\\ cernbox-drive\\ eos\\ web\\ ' ,
175+ experiment: ' \\\\ cernbox-drive\\ eosexperiment\\ ' ,
176+ workspace: ' \\\\ cernbox-drive\\ workspace\\ '
177+ },
178+ winspaces: {
179+ ' *' : ' \\\\ cernbox-drive\\ winspaces\\ ' ,
180+ }
177181 }
182+ const parts = path ?.split (' /' ).filter (Boolean )
183+ if (! parts || parts .length < 2 ) return
184+
185+ const root = parts [0 ]
186+ const key = parts [1 ]
187+ const rest = parts .slice (2 ).join (' \\ ' )
188+
189+ const rootMappings = pathMappings [root ]
190+ if (! rootMappings ) return
191+
192+ const base = rootMappings [key ] ?? rootMappings [' *' ]
193+ if (! base ) return
194+
195+ return base + rest
178196 }
179197 const sambaPath = computed (() => {
180198 return getSambaPath (
0 commit comments