Skip to content

Comment on DuckDuckGo \u202Eparent

Comments

What do you want the filesystem programmer to do?

Replace:

    if(bytestring_ends_with(filename, ".exe")) execute_file(...);
By:
    if(last_displayed_glyphs_equal(filename, ".exe")) execute_file(...);

The filesystem isn't executing anything so if anything you'd want the file manager or shell programmer to handle it. But yours is a terrible solution that would mean everyone else interacting with the filesystem to handle it too. Better to adjust the display code to treat extensions specially (if it doesn't already) and make sure that it is clear to the user what the real extension is.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.