Changeset 13970


Ignore:
Timestamp:
Feb 4, 2013, 9:53:19 PM (8 years ago)
Author:
jordan
Message:

(trunk) prefer tr_remove() to unlink() or rmdir()

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/util.c

    r13897 r13970  
    1818#include <gtk/gtk.h>
    1919#include <glib/gi18n.h>
    20 #include <glib/gstdio.h> /* g_unlink () */
    2120#include <gio/gio.h> /* g_file_trash () */
    2221
  • trunk/libtransmission/blocklist.c

    r13868 r13970  
    1717#include <string.h>
    1818
    19 #include <unistd.h> /* unlink () */
     19#include <unistd.h> /* close () */
    2020
    2121#ifdef WIN32
     
    140140{
    141141  blocklistClose (b);
    142   unlink (b->filename);
     142  tr_remove (b->filename);
    143143}
    144144
  • trunk/libtransmission/metainfo.c

    r13868 r13970  
    1717
    1818#include <sys/types.h>
    19 #include <unistd.h> /* unlink, stat */
     19#include <unistd.h> /* stat */
    2020
    2121#include <event2/buffer.h>
     
    588588
    589589  filename = getTorrentFilename (session, inf);
    590   unlink (filename);
     590  tr_remove (filename);
    591591  tr_free (filename);
    592592}
  • trunk/libtransmission/resume.c

    r13912 r13970  
    1010 * $Id$
    1111 */
    12 
    13 #include <unistd.h> /* unlink */
    1412
    1513#include <string.h>
     
    924922{
    925923    char * filename = getResumeFilename (tor);
    926     unlink (filename);
     924    tr_remove (filename);
    927925    tr_free (filename);
    928926}
  • trunk/libtransmission/rpcimpl.c

    r13913 r13970  
    1616#include <stdlib.h> /* strtol */
    1717#include <string.h> /* strcmp */
    18 #include <unistd.h> /* unlink */
    1918
    2019#ifdef HAVE_ZLIB
     
    14911490        }
    14921491
    1493         unlink (filename);
     1492        tr_remove (filename);
    14941493        tr_free (filename);
    14951494        tr_free (buf);
  • trunk/libtransmission/torrent.c

    r13969 r13970  
    29222922
    29232923    /* cleanup */
    2924     rmdir (tmpdir);
     2924    tr_remove (tmpdir);
    29252925    tr_free (tmpdir);
    29262926    tr_ptrArrayDestruct (&folders, tr_free);
  • trunk/libtransmission/utils.c

    r13969 r13970  
    4141#include <sys/types.h>
    4242#include <sys/stat.h>
    43 #include <unistd.h> /* stat (), getcwd (), getpagesize (), unlink () */
     43#include <unistd.h> /* stat (), getcwd (), getpagesize () */
    4444
    4545#include <event2/buffer.h>
     
    14691469    return -1;
    14701470
    1471   unlink (oldpath);
     1471  tr_remove (oldpath);
    14721472  return 0;
    14731473}
  • trunk/libtransmission/variant.c

    r13969 r13970  
    2424
    2525#include <locale.h> /* setlocale() */
    26 #include <unistd.h> /* write(), unlink() */
     26#include <unistd.h> /* write() */
    2727
    2828#include <event2/buffer.h>
     
    12071207          tr_logAddError (_("Couldn't save temporary file \"%1$s\": %2$s"), tmp, tr_strerror (err));
    12081208          tr_close_file (fd);
    1209           unlink (tmp);
     1209          tr_remove (tmp);
    12101210        }
    12111211      else
     
    12211221              err = errno;
    12221222              tr_logAddError (_("Couldn't save file \"%1$s\": %2$s"), filename, tr_strerror (err));
    1223               unlink (tmp);
     1223              tr_remove (tmp);
    12241224            }
    12251225        }
Note: See TracChangeset for help on using the changeset viewer.