Ignore:
Timestamp:
Jul 8, 2014, 12:08:43 AM (7 years ago)
Author:
jordan
Message:

(trunk, libT) #4160 'foreign character support' -- merge mike.dld's 4160-02b-path.patch, which updates the codebase to use the new tr_sys_path_*() portability wrappers introduced in 4160-02a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r14316 r14320  
    1818#include <string.h>
    1919#include <unistd.h> /* getuid(), close() */
    20 #include <sys/stat.h>
    2120
    2221#ifdef _WIN32
     
    4039
    4140#include "transmission.h"
    42 #include "session.h"
     41#include "file.h"
    4342#include "list.h"
    4443#include "log.h"
    4544#include "platform.h"
     45#include "session.h"
    4646
    4747/***
     
    400400isWebClientDir (const char * path)
    401401{
    402   struct stat sb;
    403402  char * tmp = tr_buildPath (path, "index.html", NULL);
    404   const int ret = !stat (tmp, &sb);
     403  const bool ret = tr_sys_path_exists (tmp, NULL);
    405404  tr_logAddInfo (_("Searching for web interface file \"%s\""), tmp);
    406405  tr_free (tmp);
     
    491490            if (s == NULL) /* check calling module place */
    492491              {
     492                char * tmp;
    493493                GetModuleFileName (GetModuleHandle (NULL), dir, sizeof (dir));
    494                 s = tr_buildPath (dirname (dir), "Web", NULL);
     494                tmp = tr_sys_path_dirname (dir, NULL);
     495                s = tr_buildPath (tmp, "Web", NULL);
     496                tr_free (tmp);
    495497                if (!isWebClientDir (s))
    496498                  {
Note: See TracChangeset for help on using the changeset viewer.