particle-iot / spark-server

UNMAINTAINED - An API compatible open source server for interacting with devices speaking the spark-protocol
https://www.particle.io/
GNU Affero General Public License v3.0
441 stars 136 forks source link

ignore `.DS_Store` and other files #20

Closed kennethlimcp closed 7 years ago

kennethlimcp commented 10 years ago

For functions checking on dir for files etc, we should try to add a checking feature for the list in settings.js which is:

notSourceExtensions: [
        ".ds_store",
        ".jpg",
        ".gif",
        ".png",
        ".include",
        ".ignore",
        ".ds_store",
        ".git",
        ".bin"
    ],
dmiddlecamp commented 10 years ago

Hey Kenneth,

Does this belong in the spark-cli? I don't totally understand this issue. Can you provide more detail?

Thanks, David

kennethlimcp commented 10 years ago

I vaguely recall that when the server is fired up (node main.js), it scans for a list of core keys.

However, in mac, the .DS_store is kinda annoying and it got listed there as well.

dmiddlecamp commented 10 years ago

Gotcha, thanks!

kennethlimcp commented 10 years ago

Or can i suggest to only filter a list of known file extensions? In this case, it will be .pub.pem since explicitly checking a list of known files might be slower.

blacklist vs whitelist idea :D