Fixed the reversing of slashes in relative Windows-type symlinks
When translating Windows-type symlinks to Linux ones, the directory separator has to be changed from '\' to '/'. The change was wrong for multiple "..\" and ".\"edge.strict_endians
parent
be58b3b1f6
commit
abba388447
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* This module is part of ntfs-3g library
|
||||
*
|
||||
* Copyright (c) 2008-2012 Jean-Pierre Andre
|
||||
* Copyright (c) 2008-2013 Jean-Pierre Andre
|
||||
*
|
||||
* This program/include file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
|
@ -313,14 +313,14 @@ static char *search_relative(ntfs_inode *ni, ntfschar *path, int count)
|
|||
if ((count >= (pos + 2))
|
||||
&& (path[pos] == const_cpu_to_le16('.'))
|
||||
&& (path[pos+1] == const_cpu_to_le16('\\'))) {
|
||||
path[1] = const_cpu_to_le16('/');
|
||||
path[pos+1] = const_cpu_to_le16('/');
|
||||
pos += 2;
|
||||
} else {
|
||||
if ((count >= (pos + 3))
|
||||
&& (path[pos] == const_cpu_to_le16('.'))
|
||||
&&(path[pos+1] == const_cpu_to_le16('.'))
|
||||
&& (path[pos+2] == const_cpu_to_le16('\\'))) {
|
||||
path[2] = const_cpu_to_le16('/');
|
||||
path[pos+2] = const_cpu_to_le16('/');
|
||||
pos += 3;
|
||||
newni = ntfs_dir_parent_inode(curni);
|
||||
if (curni != ni)
|
||||
|
|
Loading…
Reference in New Issue