blob: 91198baba5f6c7596512ddc91f67addcc3d0dc1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
diff -c -r -N Ice-3.3.0-orig/cpp/src/Slice/Util.cpp Ice-3.3.0/cpp/src/Slice/Util.cpp
*** Ice-3.3.0-orig/cpp/src/Slice/Util.cpp Tue Jun 24 10:28:04 2008
--- Ice-3.3.0/cpp/src/Slice/Util.cpp Tue Jun 24 10:44:19 2008
***************
*** 49,57 ****
++pos;
}
}
! if(result[result.size() - 1] == '/') // Remove trailing '/'
{
! result.erase(result.size() - 1);
}
return result;
}
--- 49,65 ----
++pos;
}
}
!
! if(result.size() > 1) // Remove trailing "/" or "/."
{
! if(result[result.size() - 1] == '/')
! {
! result.erase(result.size() - 1);
! }
! else if(result[result.size() - 2] == '/' && result[result.size() - 1] == '.')
! {
! result.erase(result.size() - (result.size() == 2 ? 1 : 2));
! }
}
return result;
}
***************
*** 159,164 ****
--- 167,181 ----
}
}
+ if(result == file)
+ {
+ //
+ // Don't return a full path if we couldn't reduce the given path, instead
+ // return the normalized given path.
+ //
+ result = normalizePath(orig);
+ }
+
string::size_type pos;
if((pos = result.rfind('.')) != string::npos)
{
|