Yes, we'll always deal with url style (*nix) paths and we'll primarily deal with only relative paths letting FileMIO resolve to absolute. Only using root paths for FileMIO when creating. Also to note I check that the exanded relative path exists under the root_path to sandbox to a particular tree. Using relative paths should keep things simple, except for times when we want full_path for logging or messages. What I did in those cases was added a full_pathname attribute for output which we can read from if from FileMIO it has root+relative path, for all other MIO objects it just is the same as relative path.
<br><br>That's a bummer that cleanpath doesn't work on win32.<br><br>Yes, I actually had to add the set_root_path thing in after the fact, when I realized that I didn't have RAILS_ROOT yet when inside of rails_init.rb. So if you have that taken care of with initializer then we can simlify that. I guess I wasn't aware that RAILS_ROOT would be available in initializer. If you can update initializer how it needs to be then I can take out that method to simplify. So I guess that's why it didn't make sense to you, I didn't build it in originally either :-)
<br><br>Is initializer also where we do the rest of rails_init.rb, the watcher setup? I also added some code to there today to copy the stylesheets that are needed for masterview admin if it is enabled and they don't exist, so I wasn't sure if you said this was going away (then let me know where I should put the code). 
<br><br>Jeff<br><br><br><br><div><span class="gmail_quote">On 6/15/06, <b class="gmail_sendername">Deb Lewis</b> &lt;<a href="mailto:djlewis@acm.org">djlewis@acm.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jeff - we'll need to go over path handling one more time so our brains and<br>code are both clear.<br><br>Assumption: we'll always deal with normalized path representations (/ path<br>separator, not krufty windows \).&nbsp;&nbsp;Initializer or other points where paths
<br>can come in from the outside are responsible for doing any cleanup and<br>normalization.<br><br>Caveat: an abs path on Win32 has a drive letter prefix ('X:/foo/bar'), but<br>not on *nix, and the ruby file services don't necessarily work as desired.
<br>(eg, believe it told me that 'X:/foo' is a relative path when I was<br>experimenting with abs/rel path services)<br><br>Implications: the only place where we should need to do things like<br>expand_path and cleanpath are in 
initializer.rb, which bolts down all the<br>fundamental root dir path refs for the app session, or any subsequent points<br>where we provide services to establish an MIO onto a directory.&nbsp;&nbsp;I think<br>there's some now-unnecessary cases of this scattered around the MIO world
<br>that can be dropped.<br><br>Side note: cleanpath doesn't on Windows, sigh - ugly things like<br>'../foo/../bing/bam' clutter up my RAILS_ROOT, which is why I made sure our<br>MV initializer tries to clean things up.&nbsp;&nbsp;At least on Win32, expand_path
<br>cleans up all the kruft so cleanpath seems unnecessary, but we can put that<br>back if needed on *nix.<br><br>Area we need to review: FileMIOTree's root_path and set_root_parent - I<br>don't quite understand the subtleties of what you're trying to do with the
<br>latter in latest rails_init, we'll need to review.&nbsp;&nbsp;Not sure it's needed<br>since new initializer instantiates the MasterView::IOMgr with FileMIOTree's<br>whose root_paths are already properly resovled to abs dir refs w/in rails
<br>app.&nbsp;&nbsp;Muddling about in there this morning....<br><br>~ Deb<br><br><br>_______________________________________________<br>Masterview-devel mailing list<br><a href="mailto:Masterview-devel@rubyforge.org">Masterview-devel@rubyforge.org
</a><br><a href="http://rubyforge.org/mailman/listinfo/masterview-devel">http://rubyforge.org/mailman/listinfo/masterview-devel</a><br></blockquote></div><br>