Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for lnk and alias formats #200

Merged
merged 6 commits into from Apr 20, 2019

Conversation

stroncium
Copy link
Contributor

@stroncium stroncium commented Apr 11, 2019

@stroncium
Copy link
Contributor Author

solves #192

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

Use the Fixes #192 wording in the PR description (applies to all your PRs), so the issue is automatically closed when the PR is merged.

@stroncium stroncium changed the title Add support for lnk and alias Add support for lnk and alias, fixes #192 Apr 17, 2019
index.js Outdated Show resolved Hide resolved
@sindresorhus sindresorhus changed the title Add support for lnk and alias, fixes #192 Add support for lnk and alias formats Apr 19, 2019
index.js Outdated
if (check([0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46])) {
return {
ext: 'lnk',
mime: 'application/x.ms.shortcut'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment that the MIME is just invented by us? Same with the other one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, technically, x. already indicates it was just invented by random person. I'll add it to readme.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but sometimes it's a common convention shared by multiple tools/software. Here, it's just us using it.

@sindresorhus sindresorhus changed the title Add support for lnk and alias formats Add support for lnk and alias formats Apr 19, 2019
@sindresorhus sindresorhus merged commit aacd31a into sindresorhus:master Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: how to detect if a file is an "alias" or a "shortcut" of a file ?
2 participants