>> So, if a user turns off 'compression', will $TEMP_DIR/filename.lyxdir >> be moved to $DOC_DIR/filename.lyxdir? > > Unless such a directory exists, in which case it'll be moved to a new empty > directory, just as on your proposal. But of course, if you think something > else should happen, it could. > >> Now, when I turn on 'compression', what will happen to >> $DOC_DIR/filename.lyxdir?
> Nothing. Indeed, filename.lyx will still exist, and it will still be usable > with filename.lyxdir. LyX is not in the business of deleting such things. > > All of this makes perfect sense if you understand the difference between > bundling and wrapping. If you don't, then I'm sure it's very puzzling > indeed. It makes no sense to me. When a compressed, bundled file is opened, the filename.lyxdir will be in $TEMP_DIR, so when a user inserts a file, it will go to $TEMP_DIR/filename.lyxdir, right? This is another new behavior. Then, when I turn off (filename.lyxdir moved to $DOC_DIR), and then turn on (filename.lyxdir remain in $DOC_DIR), when a user inserts a file, the file will go to $DOC_DIR/filename.lyxdir. Do you see a problem? My original guess was that you would always use $DOC_DIR, which has this 'document directory not writable' trouble, but should work better than your solution. Of course, all these are implementation details that you do not want to think about now. Cheers, Bo