Brad,

Thanks for taking a look at this.  I couldn't reproduce it on my  
Windows 7 box because I don't have an empty string mount point.

The problem is we're calling normalize-path in the file-system-info  
word.  We want to pass the raw pathnames returned from the find- 
volumes word, but on user-supplied pathnames we want Factor to  
normalize the pathname, e.g. "resource:basis/foo/foo.factor" becomes  
"c:\\factor\\basis\\foo\\foo.factor".

I changed it so now there's a (file-system-info) word that does not  
normalize pathnames.  The file-systems word calls (file-system-info)  
without touching the path returned by find-volumes.

Please let me know if this works!

Doug



On Sep 8, 2009, at 4:34 PM, Brad Christensen wrote:

> Hi Doug,
>
> A silly thing I noticed while playing around with file system meta- 
> data...
>
> file-systems produces a duplicate entry on my system (Windows 7). I  
> think this is due to Win 7's "System Reserved Partition".
>
> ( scratchpad ) file-systems .
> {
>     T{ win32-file-system-info
>         { device-name "System" }
>         { mount-point "C:\\" }
>         { type "NTFS" }
>         { available-space 50689634304 }
>         { free-space 50689634304 }
>         { used-space 29229678592 }
>         { total-space 79919312896 }
>         { max-component 255 }
>         { flags 65470719 }
>         { device-serial 3794666122 }
>     }
>     T{ win32-file-system-info
>         { device-name "System" }
>         { mount-point "C:\\" }
>         { type "NTFS" }
>         { available-space 50689634304 }
>         { free-space 50689634304 }
>         { used-space 29229678592 }
>         { total-space 79919312896 }
>         { max-component 255 }
>         { flags 65470719 }
>         { device-serial 3794666122 }
>     }
>     T{ file-system-info { mount-point "D:\\" } }
> }
>
> ( scratchpad ) find-volumes .
> {
>     "\\\\?\\Volume{bb41c5b0-5639-11de-b478-806e6f6e6963}\\"
>     "\\\\?\\Volume{bb41c5b1-5639-11de-b478-806e6f6e6963}\\"
>     "\\\\?\\Volume{bb41c5b4-5639-11de-b478-806e6f6e6963}\\"
> }
>
> ( scratchpad ) find-volumes [ volume>paths ] map concat .
> { "" "C:\\" "D:\\" }
>
> As you can see, the first volume maps to an empty path (I guess  
> because the system reserved partition has no mount point?), which is  
> later transformed to match the root of the current-directory in M:  
> string (normalize), causing the duplication. In any case it is a  
> different partition than the one I called "System". Whether it's  
> still a volume one would want to get information on, I don't know.
>
> I'd look further but I don't know anything about the alien stuff  
> (working on it) :p .
>
> Brad
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  
> http://p.sf.net/sfu/bobj-july_______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to