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

Make files readonly if they contain a magic 'readonly' string #573

Merged
merged 2 commits into from
Oct 5, 2016

Conversation

yc2lee
Copy link
Collaborator

@yc2lee yc2lee commented Sep 28, 2016

You can make files readonly by typing these strings anywhere in the file (case-insensitive):

racket: ;; THIS FILE IS READONLY
c/h: // THIS FILE IS READONLY
no extension or txt: THIS FILE IS READONLY

@kpalway
Copy link
Contributor

kpalway commented Sep 28, 2016

I'd prefer if the string said something like SEASHELL_READONLY instead, and if that part of the string were defined as a constant somewhere. Just a minor thing.

@dtompkins
Copy link
Collaborator

if that's the case, then I'd prefer:

static const int SEASHELL_READONLY = 1;

and

(define SEASHELL_READONLY true)

but I'm fine with

// SEASHELL_READONLY

as well

On Wed, Sep 28, 2016 at 3:14 PM, Kaleb Alway notifications@github.com
wrote:

I'd prefer if the string said something like SEASHELL_READONLY instead,
and if that part of the string were defined as a constant somewhere. Just a
minor thing.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#573 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAIH7jb25hJmi9ZGB5WkJcyg70WhhIDWks5quryagaJpZM4KIXWQ
.

@yc2lee
Copy link
Collaborator Author

yc2lee commented Sep 29, 2016

I can make the magic readonly string be any sttring, including "(define SEASHELL_READONLY true)", but it'll just be a string equality check... so something like

(define SEASHELL_READONLY (= 1 (+ 0 1)))

won't work... is that okay?

@kpalway
Copy link
Contributor

kpalway commented Sep 29, 2016

I don't like the idea of adding actual code to the file that isn't intended to be parsed as code.. for me, the comment makes it clearer that this is something Seashell checks on the frontend (and especially not by parsing the code)

@kpalway kpalway merged commit a29d946 into cs136:master Oct 5, 2016
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.

None yet

3 participants