Skip to content

Commit d9824f8

Browse files
committed
Merge branch 'development' into debugtree_copy
2 parents 442ba28 + 92beb1f commit d9824f8

File tree

7 files changed

+23
-7
lines changed

7 files changed

+23
-7
lines changed

External/Plugins/ProjectManager/Projects/ProjectPaths.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@ public static string GetRelativePath(string baseDirectory, string path)
1313
throw new ArgumentException("The path is already relative.");
1414

1515
char slash = Path.DirectorySeparatorChar;
16-
string[] a = baseDirectory.Trim(slash).Split(slash);
17-
string[] b = path.Trim(slash).Split(slash);
16+
path = path.TrimEnd(slash);
17+
baseDirectory = baseDirectory.TrimEnd(slash);
18+
19+
// trivial cases
20+
if (path == baseDirectory)
21+
return "";
22+
if (path[1] == ':' && path[0] != baseDirectory[0]) // drive
23+
return path;
24+
if (path.Length > baseDirectory.Length && path.StartsWith(baseDirectory + slash))
25+
return path.Substring(baseDirectory.Length + 1);
26+
27+
// resolve relative path
28+
string[] a = baseDirectory.Split(slash);
29+
string[] b = path.Split(slash);
1830

1931
ArrayList relPath = new ArrayList();
2032
int i = 0;
@@ -26,6 +38,10 @@ public static string GetRelativePath(string baseDirectory, string path)
2638
break;
2739
}
2840

41+
// only common drive letter, consider not relative
42+
if (i <= 1)
43+
return path;
44+
2945
// at this point, i is the index of the first diverging element of the two paths
3046
int backtracks = a.Length - i;
3147
for (int j = 0; j < backtracks; j++)

FlashDevelop/Bin/Debug/FirstRun.fdb

159 Bytes
Binary file not shown.

PluginCore/PluginCore/Resources/de_DE.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5900,7 +5900,7 @@ Eigene Sprachumgebungen müssen eine Erweiterung der Standard-Sprachumgebung sei
59005900
<value>Disables the move refactoring of files and folders.</value>
59015901
<comment>Added after 4.7.2</comment>
59025902
</data>
5903-
<data name="HighlightMatchingWordsDelay" xml:space="preserve">
5903+
<data name="FlashDevelop.Description.HighlightMatchingWordsDelay" xml:space="preserve">
59045904
<value>The delay in milliseconds after the word match highlight should be shown.</value>
59055905
<comment>Added after 4.7.2</comment>
59065906
</data>

PluginCore/PluginCore/Resources/en_US.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5913,7 +5913,7 @@ Custom locales must be an extension of a default locale, e.g. en-US.</value>
59135913
<value>Disables the move refactoring of files and folders.</value>
59145914
<comment>Added after 4.7.2</comment>
59155915
</data>
5916-
<data name="HighlightMatchingWordsDelay" xml:space="preserve">
5916+
<data name="FlashDevelop.Description.HighlightMatchingWordsDelay" xml:space="preserve">
59175917
<value>The delay in milliseconds after the word match highlight should be shown.</value>
59185918
<comment>Added after 4.7.2</comment>
59195919
</data>

PluginCore/PluginCore/Resources/eu_ES.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5897,7 +5897,7 @@ Lokalizazio pertsonalizatuek lehenetsiaren luzapen bat izan behar dute, adb. en-
58975897
<value>Disables the move refactoring of files and folders.</value>
58985898
<comment>Added after 4.7.2</comment>
58995899
</data>
5900-
<data name="HighlightMatchingWordsDelay" xml:space="preserve">
5900+
<data name="FlashDevelop.Description.HighlightMatchingWordsDelay" xml:space="preserve">
59015901
<value>The delay in milliseconds after the word match highlight should be shown.</value>
59025902
<comment>Added after 4.7.2</comment>
59035903
</data>

PluginCore/PluginCore/Resources/ja_JP.resX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5962,7 +5962,7 @@ UseData:"</value>
59625962
<value>Disables the move refactoring of files and folders.</value>
59635963
<comment>Added after 4.7.2</comment>
59645964
</data>
5965-
<data name="HighlightMatchingWordsDelay" xml:space="preserve">
5965+
<data name="FlashDevelop.Description.HighlightMatchingWordsDelay" xml:space="preserve">
59665966
<value>The delay in milliseconds after the word match highlight should be shown.</value>
59675967
<comment>Added after 4.7.2</comment>
59685968
</data>

PluginCore/PluginCore/Resources/zh_CN.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5910,7 +5910,7 @@
59105910
<value>Disables the move refactoring of files and folders.</value>
59115911
<comment>Added after 4.7.2</comment>
59125912
</data>
5913-
<data name="HighlightMatchingWordsDelay" xml:space="preserve">
5913+
<data name="FlashDevelop.Description.HighlightMatchingWordsDelay" xml:space="preserve">
59145914
<value>The delay in milliseconds after the word match highlight should be shown.</value>
59155915
<comment>Added after 4.7.2</comment>
59165916
</data>

0 commit comments

Comments
 (0)