Re: current directory changes unexpectedly [message #69648] |
Wed, 27 January 2010 06:47 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
simona bellavista writes:
> I start working in idl, I compile and run programs, abruptly it cannot
> find anymore the routines I am working on, I check the current folder
> with
> cd, current=dir
> print, dir
> and I discover the current folder has changed.
>
> I performed several tests trying to reproduce the error intentionally,
> but I have never succeed.
Then I would think the most likely explanation, especially
if you think this is happening randomly, is that one of the
programs you are running changes directories with a CD
command. I have programs, for example, that save the
current directory and change to some other directory:
CD, CURRENT=thisDir, 'someotherDirectory'
Before I exit the program, I change back:
CD, thisDir
If such a program stopped in the middle of the program for
some reason (I forgot to add a Catch error handler to the
program, for example), then I would be in some directory
I didn't expect to be in.
I can imagine a program that even forgets to switch back
to the starting directory, perhaps by returning in an
unusual location or from a Catch error handler. That
would also produce the result you are seeing.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: current directory changes unexpectedly [message #69649 is a reply to message #69648] |
Wed, 27 January 2010 06:38  |
simona bellavista
Messages: 56 Registered: December 2009
|
Member |
|
|
I start working in idl, I compile and run programs, abruptly it cannot
find anymore the routines I am working on, I check the current folder
with
cd, current=dir
print, dir
and I discover the current folder has changed.
I performed several tests trying to reproduce the error intentionally,
but I have never succeed.
On Jan 27, 3:25 pm, David Fanning <n...@dfanning.com> wrote:
> simona bellavista writes:
>> no, by the way there isn't any idl source file in my home folder, so I
>> never open anything from that folder
>
> What causes you to think you have changed folders?
> How do you confirm this?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: current directory changes unexpectedly [message #69650 is a reply to message #69649] |
Wed, 27 January 2010 06:25  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
simona bellavista writes:
> no, by the way there isn't any idl source file in my home folder, so I
> never open anything from that folder
What causes you to think you have changed folders?
How do you confirm this?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: current directory changes unexpectedly [message #69653 is a reply to message #69651] |
Wed, 27 January 2010 06:08  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Jan 27, 11:54 am, simona bellavista <afy...@gmail.com> wrote:
> Hi,
>
> I run idl 7.0.3 on a server, and I am using linux.
> I set up my starting directory(like /scratch/something on my desktop)
> by the idl ide. I choose it to be different than my linux home
> directory(/u/something), that is also on a server.
> while I am working on idl from time to time the current directory
> changes abruptly to my linux home directory(/u/something). I have been
> observing this for quite a while and I couldn't spot the reason, not
> even understand in which conditions it happens. it looks like it
> happens just by chance.
> what do you think of it? has anybody experienced this behaviour
> before?
Do you have "change directory on file open" enabled on prefernces->IDL-
editor ?
|
|
|