Page 1 of 1

makepath function with UNC

Published: May 25, 2023 - 3:42 PM
by SeiyaGame
Good morning,

I would like to report a bug I discovered while working on the WAPT vscode package. It seems that the function makepath() does not handle UNC paths correctly.

Below, I have included an excerpt of my code to illustrate the problem:

Code: Select all

user_conf_dir = makepath(user_appdata, "Code", "User") # NOT WORKING
#Résultat : SRV-FICHIERS\Share$\user\Application Data\Code\User

user_conf_dir = os.path.join(user_appdata(), "Code", "User") # GOOD
#Résultat : \\SRV-FICHIERS\Share$\user\Application Data\Code\User
As you can see, when I use makepath()The return path is incorrect. However, when I use os.path.join() The UNC path is resolved correctly.

This poses a problem in our environment because we use roaming Windows sessions and we need UNC paths to resolve correctly.

Would it be possible to fix this bug?

General information:

WAPT Server: Debian 11, version 2.3.0.13516, Enterprise Edition
Administration machine: Windows 11, WAPT version 2.3.0.13516

Re: MakePath function with UNC

Published: May 25, 2023 - 5:47 PM
by sfonteneau
Good point, I'll take a look at that!

Re: MakePath function with UNC

Published: May 29, 2023 - 3:23 PM
by t.heroult
I had completely concluded that the makepath() function was not designed to handle UNC...

Re: MakePath function with UNC

Published: September 25, 2023 - 09:08
by SeiyaGame
I'm taking the liberty of reviving this conversation...

Indeed, it's quite a nuisance on our end. I have to rewrite each package to work around the "makepath" function issue.

I've attached an example of what it looks like in our environment.


General information:

WAPT Server: Debian 11, version 2.4.0.14143, Enterprise Edition;
Administration machine: Windows 11, WAPT version 2.4.0.14143