Reply To: desktop-menu-antix broken

Forum › Forums › New users › New Users and General Questions › desktop-menu-antix broken › Reply To: desktop-menu-antix broken

#180885
Robin
Member

    I am not sure if it is the best way yet, but a check can be added for this.
    if USER_HOME[-1] != ‘/’: USER_HOME = USER_HOME+”/”

    Many thanks @Dave for looking into this and the input, I’ll fix this in the productive version of desktop-menu, so you can concentrate on the multi-user support rewrite you are on.

    Did some checks already. In all occurrences where HOME is used in this script it adds the slashes explicitly (except for the positions in which anticapitalista has added them above), so it is preferable to guarantee the variable itself doesn’t contain an additional slash behind in the three occurrences where it is generated, precisely like Brian @Masinick already had pointed out.

    That should do the trick already:
    USER_HOME = USER_HOME.rstrip('/')
    to be placed where the string content is generated.

    In theory this should be enough to see a stable behaviour, neither creating paths with double slashes nor omitting an expected slash.

    I’ll test this approach in situ, and then I’ll send a merge request to @anticapitalista with the needed fix.

    EDIT: Actually I’ll apply the rstrip method to the USER_HOME creation directly (for all occurrences where the string is not hard coded) instead of adding it in a separate line modifying the already created variable.

    Windows is like a submarine. Open a window and serious problems will start.