Bug #1098

gmt clear <opt> and gmt-datadir issues

Added by Andreas 7 days ago.

Status:NewStart date:2017-05-15
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected version:5.x-svn Platform:

Description

There seem to be one or more issues with the new gmt clear <opt> functionality.

First, this appears to vary with which windows version you're using. I installed GMT 5.4.1 on both Windows 10 and Windows 8.1.

On Windows 10
The default datadir looks good. Created in my 'home' directory C:\Users\Andreas\.gmt as per default (I guess) containing a cache folder and relief data (when using auto download)

When I ask GMT where my datadir is, it says (null)

C:\Users\Andreas\Desktop\New folder>gmt --show-datadir
(null)

Seems to work though.

Giving
  • gmt clear conf
  • gmt clear history
  • gmt clear cache

work fine.

Giving
  • gmt clear all

clears the cache, but does not delete gmt.conf and gmt.history. (I think this also applies to the Windows 8.1 case below, after I've added the HOME environment variable manually)

On Windows 8.1

Also says (null) when asked where the datadir is

C:\Users\Andreas\Desktop>gmt --show-datadir
gmt: Unable to create GMT User directory : \/.gmt
gmt: Auto-downloading of earth_relief_##m|s.grd files has been disabled.
(null)

gmt clear all causes warning/error message and gmt.exe crashes:

C:\Users\Andreas\Desktop>gmt clear all
gmt: Unable to create GMT User directory : \/.gmt
gmt: Auto-downloading of earth_relief_##m|s.grd files has been disabled.

The same warning is given if one tries

C:\Users\Andreas\Desktop>gmt clear history
gmt: Unable to create GMT User directory : \/.gmt
gmt: Auto-downloading of earth_relief_##m|s.grd files has been disabled.

but gmt.exe does not crash. I guess it's the gmt clear cache (which is included in the gmt clear all) that causes the crash (since this folder does not exist?).

If I manually add the environment variable HOME (as Joaquim hinted to in this forum post; http://gmt.soest.hawaii.edu/boards/1/topics/5288) and point to an existing folder, gmt.exe no longer crashes. Appears to run OK.

Using GMT 5.4.1 (r18203)

Also available in: Atom PDF