Bug 476032 - Can't create profile due to lack of MAX_PATH on Windows
Summary: Can't create profile due to lack of MAX_PATH on Windows
Status: ASSIGNED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-24 04:06 UTC by wangsitan
Modified: 2023-12-13 08:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wangsitan 2023-10-24 04:06:50 UTC
SUMMARY
When I try to create a profile (with a short simple name) in konsole, I got this error msg:
> Profile name exceeded maximum allowed length (-6).

According to https://invent.kde.org/utilities/konsole/-/merge_requests/877 :
> On Windows, it is done by inspecting the MAX_PATH environment variable.

I'm using Windows 10 (20H2), there is no `MAX_PATH` in env var by default. So I set `MAX_PATH` manually, and then I can create new profile now.

I think konsole should work without MAX_PATH in env. Maybe there should be a default value for MAX_PATH on Windows, 256 or 260 or something else?


STEPS TO REPRODUCE
1. Go to settings - manage profiles - new (create a new profile)
2. Input a short simple name for the profile.
3. Click OK to save profile.


OBSERVED RESULT
Fail, and got this error msg:
> Profile name exceeded maximum allowed length (-6).


EXPECTED RESULT
A new profile should be created.


SOFTWARE/OS VERSIONS
Windows: Windows 10 (20H2 19042.508)
Konsole: 23.11.70 (got from https://binary-factory.kde.org/job/Konsole_Nightly_win64/)
Comment 1 Kurt Hindenburg 2023-10-26 02:02:05 UTC
How are you installing Konsole.  I'm using craft and it works.  I agree the code should check if the  variable exist.
Comment 2 Kurt Hindenburg 2023-10-26 02:08:18 UTC
(In reply to Kurt Hindenburg from comment #1)
> How are you installing Konsole.  I'm using craft and it works.  I agree the
> code should check if the  variable exist.

Nevermind I see you are using the binary factory.  And I'm using 23.08 which doesn't use this code.  I'll try to check this out.
Comment 3 wangsitan 2023-10-26 12:03:31 UTC
(In reply to Kurt Hindenburg from comment #2)
Thank you very much =)
Comment 4 Bug Janitor Service 2023-10-27 23:21:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/910
Comment 5 Kevin Messer 2023-12-13 08:15:45 UTC
I also have the issue using the binary from the binary factory.