Re: Opening a file - File Open Dialog spoils future code
- Posted by Greg Haberek <ghaberek at ??ail.com> Jan 16, 2008
- 549 views
CChris wrote: > > I am only saying two things: > 1/ since ex.err may land in folders from where no Eu rogram was ever run, > other > processes must interfere in some cases (in case of a crash? I don't know); > 2/ since use of the current directory is so confusing for practical use under > Windows, and since there is such an excessive concern about avoiding confuion > in the language, I think relying on what the "current directory" happens to > be in an only mildly deterministic way (from the user standpoint) should be > actively discouraged in some way. > > To reply to Pete's post: I don't think this would be win32lib's job. The > interpreter > should lock the "current directory" for exw[c].exe to be the one where the > file > which is being run lies, and nullify any change not deliberately made by the > .exw being run. Otherwise, users should be specifically advised about the > seemingly > random changes it may undergo and their consequences. I'm gonna have to disagree with you there. I think any call to chdir() should be reflected back by current_dir(). The way I look at it, the interpreter should grab it's "startup directory" at the beginning and hard-set that folder to be the location for ex.err, unless changed by crash_file(). If anything, chdir() and current_dir() should use the Win32 API routines instead of the c library routines. I'm all for this. :) -Greg