Skip to content

upsdrvctl.exe uses incorrect path separator on Windows #3063

@twoeater

Description

@twoeater

Description
I'm trying to run upsdrvctl.exe on a Windows system. However, the application seems to be using a forward slash (/) as a path separator instead of a backslash (\), which is the standard for Windows.

This leads to a "No such file or directory" error because the full path C:\NUT-for-Windows-x86_64-SNAPSHOT-2.8.4.443-master\mingw64\sbin/usbhid-ups.exe is invalid on Windows.

Steps to Reproduce:

  1. Run the following command:
PS C:\NUT-for-Windows-x86_64-SNAPSHOT-2.8.4.443-master\mingw64\sbin> .\upsdrvctl.exe start
  1. Observe the error message:
Network UPS Tools upsdrvctl.exe - UPS driver controller 2.8.4 release
Can't start C:\NUT-for-Windows-x86_64-SNAPSHOT-2.8.4.443-master\mingw64\sbin/usbhid-ups.exe: No such file or directory [지정된 파일을 찾을 수 없습니다. ]

Additional Context
I attempted to use the -r option to specify the path, but this did not resolve the issue. The application still seems to construct the path internally using the incorrect separator.

Example with -r option:

PS C:\NUT-for-Windows-x86_64-SNAPSHOT-2.8.4.443-master\mingw64\sbin> .\upsdrvctl.exe -r "C:\test\" start

The output remains the same, showing the invalid path with the forward slash:

Network UPS Tools upsdrvctl.exe - UPS driver controller 2.8.4 release
Can't start C:\NUT-for-Windows-x86_64-SNAPSHOT-2.8.4.443-master\mingw64\sbin/usbhid-ups.exe: No such file or directory [지정된 파일을 찾을 수 없습니다. ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions