[GRASS5] [bug #3016] (grass) When trying to open .shp file,
Grass 6.0b2 erase all my home directory....
Hamish
hamish_nospam at yahoo.com
Sun Feb 20 00:41:41 EST 2005
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3016
> ---------------------------------------------------------------------
>
> Subject: When trying to open .shp file, Grass 6.0b2 erase all my home
> directory....
>
> Platform: Mac OSX
> grass obtained from: Trento Italy site
> grass binary for platform: Downloaded precompiled Binaries
> GRASS Version: 6.0.0b2
>
> Marc Girondot
> I play for the first time with Grass.
> When trying to open .shp file in "import esri E00" menu in verbose
> mode, it fails for unknown reason but various rm commands were
> displayed at the bottom of the window ... I quit X11 rapidly and half
> of my home folder was deleted by these rm commands...
> I try many things before this catastroph occurs and I cannot replicate
> it now as many of my file have been deleted...
> Probably it occurs during a cleaning after the import failed...
ouch.
Were files removed but not directories?
Probably it is this line:
#### trap ctrl-c so that we can clean up tmp
trap 'rm -f ${TMP}*' 2 3 15
If $TMP doesn't exist for some reason, this becomes 'rm -f *'
And in this module $TMP is never set by anything... so if you hit ^C ...
I've disabled that line in the script, I'll leave it to someone who uses
e00 files to fix this properly: I would suggest using a g.tempfile
filename to make a directory (after removing the tempfile), and put all
the temp files in there?
Tests added to r.regression.line and v.in.garmin to keep this from
happening in those modules as well (in case g.tempfile fails for some
reason).
thanks for reporting this. I guess someone had to find this bug, sorry
it happened to be you.
Hamish
More information about the grass-dev
mailing list