summaryrefslogtreecommitdiffstats
path: root/patches/0034-Made-syncqt-collapse-redundant-.-sections-in-paths.patch
blob: ac752a9a9e3fbd31a7aab843db32cdfe514d1518 (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
From af93c5fb352a32139b99620623afee87f0e7642f Mon Sep 17 00:00:00 2001
From: axis <qt-info@nokia.com>
Date: Mon, 3 Jan 2011 19:19:39 +0100
Subject: [PATCH] Made syncqt collapse redundant ".." sections in paths.

---
 qtbase/bin/syncqt |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qtbase/bin/syncqt b/qtbase/bin/syncqt
index 72b9be0..6af59c4 100755
--- a/qtbase/bin/syncqt
+++ b/qtbase/bin/syncqt
@@ -325,6 +325,8 @@ sub fixPaths {
     return basename($file) if($file_dir eq $dir);
 
     #guts
+    while ($file_dir =~ s,/[^/]+/\.\./,/,) {}
+    while ($dir =~ s,/[^/]+/\.\./,/,) {}
     my $match_dir = 0;
     for(my $i = 1; $i < length($file_dir); $i++) {
         my $slash = index($file_dir, "/", $i);
-- 
1.7.3.4