-
Notifications
You must be signed in to change notification settings - Fork 45
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
Don't break use-context shared-gdrive if a file is renamed #517
Comments
IIRC, it was because we mostly didn't trust students/teachers to copy that fileID correctly, and wanted a belt-and-suspenders check to make sure we were retrieving the intended file. We definitely want to keep the fileName in the syntax, since a file with several |
I do wonder if the history of file renamings is persisted with the file? So e.g. if the fielIDs match and the fileName matches some name in the history of the file? |
@blerner it doesn't look like we can retrieve the previous filenames, as the docs for the Proposal: If the name doesn't match but the ID does, put up a dialog notifying the user and asking if this really is the file they wanted. If it is, change the string on line 1 of the file to match whatever the updated name was, to prevent the warning from re-appearing. We could even supply the original name as a hint. |
Fine, then just check the original filename. That's the likeliest one to matter, anyway. I was worried we wouldn't have access to any prior names... We don't currently have any dialogs or warnings in pyret: things either work or are compilation errors. I don't think this is urgent enough to warrant a new modality of warning messages, but it's possible we need to improve what the compilation error looks like. (I'm on my phone right now, not computer, so I can't see what the current error looks like...) |
@schanzer reports:
AFAICT from debugging this, we only need the id to fetch the contents of the file from a security/permissions standpoint. Even if I change the file name to be wrong, the contents of the file are fetched by id and make it all the way to the browser. We're just choosing to throw an error after that if the name doesn't match.
From a cursory look, this seems not hard to fix. But before I attempt a fix, I am filing this issue so someone has a chance to tell me this is a load-bearing error or if there is some history as to why the name match is enforced.
The text was updated successfully, but these errors were encountered: