DeZonia, Barry
2005-Jan-19 14:28 UTC
[fxruby-users] FXFileDialog.getOpenFilenames() question
FxRuby 1.2.2 on Windows with Ruby 1.8.2 I''m using FXFileDialog.getOpenFilenames() passing nil for the path and I''m having a little difficulty. Specifically how does getOpenFilenames determine the initial path to use when nil is passed in? On my system its defaulting to a path it somehow chose with the long name "c:\InputTestFiles" replaced with the DOS short name "c:\INPUTT~1". This causes problems with my app. (Note that C:\InputTestFiles is a directory on my system) On a related note I''ve seen FxRuby/FOX sometimes replace full paths from FXFileDialog with DOS shortened paths. Any ideas why?
lyle@knology.net
2005-Jan-19 14:49 UTC
[fxruby-users] FXFileDialog.getOpenFilenames() question
On Wed, 19 Jan 2005 13:30:56 -0600, "DeZonia, Barry" <bdezonia@wisc.edu> wrote :> I''m using FXFileDialog.getOpenFilenames() passing nil for the path and I''m > having a little difficulty. Specifically how does getOpenFilenames determine > the initial path to use when nil is passed in? On my system its defaulting > to a path it somehow chose with the long name "c:\InputTestFiles" replaced > with the DOS short name "c:\INPUTT~1". This causes problems with my app. > (Note that C:\InputTestFiles is a directory on my system) > > On a related note I''ve seen FxRuby/FOX sometimes replace full paths from > FXFileDialog with DOS shortened paths. Any ideas why?I will need to dig into the C++ source code for FOX to answer these questions (unless you want to try posing the questions over on the FOX mailing list). That is to say, these behaviors are defined by the FOX library itself and not directly related to the FXRuby binding. My hunch for the first question is that it defaults to the process'' current working directory (i.e. perhaps you started the Ruby interpreter in the C:\InputTestFiles" directory, or changed directories to that directory?).
Jeroen van der Zijp
2005-Jan-19 14:53 UTC
[fxruby-users] FXFileDialog.getOpenFilenames() question
On Wednesday 19 January 2005 02:30 pm, DeZonia, Barry wrote:> > FxRuby 1.2.2 on Windows with Ruby 1.8.2 > > I''m using FXFileDialog.getOpenFilenames() passing nil for the path and I''m > having a little difficulty. Specifically how does getOpenFilenames determine > the initial path to use when nil is passed in? On my system its defaultingIf the filename is NULL or "", the current working directory is used to construct the absolute path.> to a path it somehow chose with the long name "c:\InputTestFiles" replaced > with the DOS short name "c:\INPUTT~1". This causes problems with my app. > (Note that C:\InputTestFiles is a directory on my system)Are you running old VFAT filesystem? NTFS should have no problems...> On a related note I''ve seen FxRuby/FOX sometimes replace full paths from > FXFileDialog with DOS shortened paths. Any ideas why?This is probably a VFAT peculiarity. It does not happen on NTFS as far as I know. At any rate, FOX itself does not "violate" the filenames this way. Some system call inside Windows must be doing this. - Jeroen