Ignore:
Timestamp:
Jul 4, 2014, 3:23:27 AM (8 years ago)
Author:
jordan
Message:

(trunk, libT) #5656 'Problems renaming files' -- fixed, patch by rb07

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r14316 r14317  
    35933593      const char * name = tor->info.files[i].name;
    35943594      const size_t len = strlen (name);
    3595       if ((len >= oldpath_len) && !memcmp (oldpath, name, oldpath_len))
     3595      if ((len == oldpath_len || (len > oldpath_len && name[oldpath_len] == '/')) &&
     3596          !memcmp (oldpath, name, oldpath_len))
    35963597        indices[n++] = i;
    35973598    }
     
    37363737      if (n == 0)
    37373738        {
    3738           errno = EINVAL;
     3739          error = EINVAL;
    37393740        }
    37403741      else
Note: See TracChangeset for help on using the changeset viewer.