Changeset 8ffa264


Ignore:
Timestamp:
May 30, 2011, 7:45:45 PM (13 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
259e60a8
Parents:
6eb3ed9
git-author:
Jason Gross <jgross@mit.edu> (05/17/11 13:04:53)
git-committer:
Anders Kaseorg <andersk@mit.edu> (05/30/11 19:45:45)
Message:
startup: check for file before calling owl_util_file_deleteline

This fixes trac #175: '"startup" command produces error when run for the
first time'.  The startup command deletes duplicate lines, and thus
errored when no file existed.  A check has been added to prevent this.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r697221f r8ffa264  
    32533253  filename=owl_global_get_startupfile(&g);
    32543254
    3255   /* delete earlier copies */
    3256   owl_util_file_deleteline(filename, buff, 1);
     3255  /* delete earlier copies, if the file exists */
     3256  if (g_file_test(filename, G_FILE_TEST_EXISTS))
     3257    owl_util_file_deleteline(filename, buff, 1);
    32573258
    32583259  file=fopen(filename, "a");
Note: See TracChangeset for help on using the changeset viewer.