halfbrained / cuda_runner

Runner - plugin for CudaText. Adds commands to build/compile files/projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

it's not fully correct function

Alexey-T opened this issue · comments

def collapse_path(path):
    if path.startswith(USER_DIR):
        path = path.replace(USER_DIR, '~', 1)
    return path

for name like /home/user2/test' it gives ~2/test`
:)

need
if (path+'/').startswith(USER_DIR+'/'):

Dont leave Windows behind :)
(path + os.sep).startswith(USER_DIR + os.sep)

fixed