qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.11k stars 66 forks source link

`.DS_Store` trips up `qri remove --all --force` #1190

Closed feep closed 4 years ago

feep commented 4 years ago

This isn’t qri’s fault. It is the Finder crapping all over the filesystem

All the same, you are going to have Mac users.

Do we want to special case a directory containing only .DS_Store as empty?

❯ qri remove --all --force 
for linked dataset [feep/ca_parks_starlark]

remove /Users/rusty/qri/caparks/qri/starlark: directory not empty

❯ ls
.rw-r--r--@ 6.1k rusty 03-16 00:55 -I .DS_Store
dustmop commented 4 years ago

I think the best bet here would be to get an explicit list of "low-information" files that remove --force should be okay with deleting. Definitely .DS_Store, but there's also things like .thumbs.db and some other Windows specific files such as desktop.ini. Would be nice to have a well-curated list that is generally agreed upon, and then we should document that as well.

feep commented 4 years ago

A commented blacklist here:

https://github.com/sindresorhus/junk/blob/a7c280daddca13fe5d2f731235b97bdfb5940fda/index.js#L3

More, but that one seems pretty good.

https://github.com/search?q=.ds_store+thumbs.db

Arqu commented 4 years ago

Just to bring our slack conversation back into this: