Ticket #45 (closed defect: invalid)

Opened 3 years ago

Last modified 5 months ago

Over-zealous search for notebook index file

Reported by: kaiw Assigned to:
Priority: high Keywords:
Cc:

Description

When trying to find a notebook to associate a file with, reinteract seems a little over-zealous.

I placed (admittedly, for debugging purposes) an index.rnb file in my home directory, and tried to open a standalone worksheet in a subdirectory from the command line. The logic in find_notebook_path() chains up to higher-level directories, at which point the index.rnb in ~ caused reinteract to scan my entire home directory, adding everything in it to the file list; this operation also crashed out when it hit a file that it couldn't access, but that's beside the point.

I'm not sure what the correct behaviour here is, but there is obvious potential for the current notebook search method to do bad things. One possibility would be for index.rnb files to store their containing path, only scan that directory on opening, and don't auto-associate with files unless they are under the stored path. In this case there would probably need to be some kind of prompt for when people moved/renamed the containing directory.

Change History

09/09/08 09:03:08 changed by otaylor

Need to think about this a little more:

* Was reinteract doing exactly what you asked for? ;-)

* Should we just check for an index.rnb right next to the specified file? After all, there's not even any UI for creating subfolders in reinteract currently.

* Would it make sense to do the hunt-for-notebook thing only inside ~/Documents/Reinteract and be more restrictive about how we search elsewhere?

11/14/08 11:04:09 changed by kaiw

Was reinteract doing exactly what you asked for? ;-)

Well, sure. Except that it's obviously not a sane thing to ask for, the sanity of users (including myself) being somewhat questionable.

Should we just check for an index.rnb right next to the specified file? After all, there's not even any UI for creating subfolders in reinteract currently.

That would seem fairly reasonable. However, it's easy to imagine that as reinteract grows more capabilities, people would start doing things like, e.g., having a notebook with results in subdirectories, with worksheets sitting next to the results.

Would it make sense to do the hunt-for-notebook thing only inside ~/Documents/Reinteract and be more restrictive about how we search elsewhere?

reinteract.state already contains a list of known notebooks. How about only searching through that list to find a matching parent directory? That would be a lot safer, and should work in the vast majority of cases.

09/17/11 15:33:51 changed by otaylor

  • status changed from new to closed.
  • resolution set to invalid.

Moved to https://bugzilla.gnome.org/show_bug.cgi?id=659344, closing as "invalid"