Bug #1259

gmt clear history does not remove gmt.history

Added by Andreas about 1 month ago. Updated 17 days ago.

Status:ClosedStart date:2018-07-16
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next minor release
Affected version:6.x-svn Platform:

Description

Rather trivial, but still;

gmt clear history

does not seem to do it's job.

$ pscoast -EGL+p -JM15c -P > GL.ps
$ gmt clear history
$ ls -la
total 288
drwxrwxrwx 1 anbj anbj    512 Jul 16 14:44 .
drwxrwxrwx 1 anbj anbj    512 Jul 16 14:41 ..
-rwxrwxrwx 1 anbj anbj 292328 Jul 16 14:44 GL.ps
-rwxrwxrwx 1 anbj anbj     81 Jul 16 14:44 gmt.history
$ gmt --version
6.0.0_r20419

Associated revisions

Revision 20421
Added by Paul about 1 month ago

Address issue #1259

History

#1 Updated by Andreas about 1 month ago

Using Linux subsystem for Windows, Ubuntu.

#2 Updated by Paul about 1 month ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next minor release
  • % Done changed from 0 to 100

A fun one. The gmt.history file is definitively deleted, but then GMT_Destroy_Session comes along and writes another one out before gmt exits.... I have added a new special check so that clear can finish without another history being written. In r20421.

#3 Updated by Andreas about 1 month ago

Nice one.

Also, issuing a gmt clear all leaves the gmt.history 'untouched'.

$ pscoast -EGL+p -JM15c -P > GL.ps

$ ls -l
total 288
-rwxrwxrwx 1 anbj anbj 292328 Jul 18 10:13 GL.ps
-rwxrwxrwx 1 anbj anbj     81 Jul 18 10:13 gmt.history

$ gmt clear all
clear [ERROR]: Failed to remove gmt.conf! [remove error: No such file or directory]

$ ls -l
total 288
-rwxrwxrwx 1 anbj anbj 292328 Jul 18 10:13 GL.ps
-rwxrwxrwx 1 anbj anbj     81 Jul 18 10:13 gmt.history

#4 Updated by Paul about 1 month ago

Sigh, forgot the other test... r20434.

#5 Updated by Andreas about 1 month ago

Perfect, Paul.

#6 Updated by Paul 17 days ago

  • Status changed from Resolved to Closed

Fixed and done.

Also available in: Atom PDF