From bce98b2826f075269335cfb9178d91de63231abe Mon Sep 17 00:00:00 2001
From: Matthias Melcher
Date: Tue, 16 Nov 2010 14:40:08 +0000
Subject: [PATCH] Fixed wrong relative path (STR #2384)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@7859 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
ANNOUNCEMENT | 2 ++
CHANGES | 1 +
src/filename_absolute.cxx | 1 +
3 files changed, 4 insertions(+)
diff --git a/ANNOUNCEMENT b/ANNOUNCEMENT
index 8a4ec692b..109674688 100644
--- a/ANNOUNCEMENT
+++ b/ANNOUNCEMENT
@@ -19,6 +19,7 @@ Changes since FLTK 1.1.10 include:
- Fixed menu and shortcut handling (STR #2243)
- Fixed multiple line output of fltk-config --libs (STR #2408)
- Fixed handling of missing fonts in Xft (STR #2355)
+ - Fixed wrong relative path (STR #2384)
----HTML----
@@ -45,5 +46,6 @@ exceptions that allow for static linking.
Fixed menu and shortcut handling (STR #2243)
Fixed multiple line output of fltk-config --libs (STR #2408)
Fixed handling of missing fonts in Xft (STR #2355)
+ Fixed wrong relative path (STR #2384)
diff --git a/CHANGES b/CHANGES
index 9782ad92b..4e974e407 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@ CHANGES IN FLTK 1.1.11
- Fixed menu and shortcut handling (STR #2243)
- Fixed multiple line output of fltk-config --libs (STR #2408)
- Fixed handling of missing fonts in Xft (STR #2355)
+ - Fixed wrong relative path (STR #2384)
CHANGES IN FLTK 1.1.10
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx
index e53fcb462..8bc8b4193 100644
--- a/src/filename_absolute.cxx
+++ b/src/filename_absolute.cxx
@@ -186,6 +186,7 @@ fl_filename_relative(char *to, // O - Relative filename
if (isdirsep(*slash)) slash ++;
// do the same for the current dir
+ if (isdirsep(*newslash)) newslash--;
if (*newslash != '\0')
while (!isdirsep(*newslash) && newslash > cwd) newslash --;