Menu

#42 Listing a preview directory

workingwiki
open
5
2013-05-07
2011-01-21
No

A couple of times I've had weird errors trying to list a preview you directory (clicking list working directory from the MP page). Something about "." not existing.

My interpretation is that this is what happens when you try to list before performing an action that would actually create the preview directory.

A thought is that the desired behavior might be to list the persistent directory. This would certainly be the case if you were only ever listing; trickier is the question of what would happen then if you click to make, for example. Ideally, I guess the preview directory would be created then.

Discussion

  • Jonathan Dushoff

    I think this is conceptually the same. If I click on a source file inside a preview MP page in a preview that hasn't created its preview directory yet, I get: Error: ProjectEngine: Can not perform operation: preview session 1342576754_Study_questions/population_growth does not exist.

    Desired behaviour would be that the source file would be found in the persistent directory, I think. There's no associated make button, so that part's OK.

     
  • Lee Worden

    Lee Worden - 2011-01-24

    But someone might want to design their pages so as to avoid the directory-copying in some circumstances, and then they'd want to know. I wouldn't want to try to fool the user...

    I admit there's a problem with exposing inplementation details to the user. Ideally the preview directory should be a copy-on-write duplicate of the persistent one.

    I don't know how hard it would be to have it fall back to the persistent directory when seeking the preview one in read-only operations. If it's not a can of worms I'm not necessarily opposed to it.

     
  • Lee Worden

    Lee Worden - 2011-01-24

    I guess the don't-fool-the-user issue would be solved by including a message "Preview copy has not been created, using persistent directory"

     

Anonymous
Anonymous

Add attachments
Cancel