makepath function with UNC

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
SeiyaGame
Messages: 13
Registration: May 25, 2023 - 3:19 p.m.

May 25, 2023 - 3:42 PM

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
Last edited by SeiyaGame on May 29, 2023 - 2:17 PM, edited 2 times.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

May 25, 2023 - 5:47 PM

Good point, I'll take a look at that!
User avatar
t.heroult
Messages: 307
Registration: December 8, 2020 - 10:13 AM

May 29, 2023 - 3:23 PM

I had completely concluded that the makepath() function was not designed to handle UNC...
Server: WAPT Enterprise 2.6.1.17786 on Debian
Consoles: Windows 10 & 11
Infrastructure: Windows

Did you know? When parrotfish undergo smoltification, their osmoregulation mechanism is reversed!
SeiyaGame
Messages: 13
Registration: May 25, 2023 - 3:19 p.m.

September 25, 2023 - 09:08

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
Attachments
Example makepath Failed
Example makepath Failed
Screenshot 2023-09-25 090309.png (12.57 KB) Viewed 3211 times
Locked