You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (getApplicationConfig().getAlwaysUseUNCPaths())
1912
+
if (mediaDir.onNetworkDrive())
1884
1913
{
1885
-
if (mediaDir.onNetworkDrive())
1886
-
{
1887
-
mediaDir = newUNCFile(mediaDir.getUNCPath());
1888
-
}
1914
+
mediaDir = newUNCFile(mediaDir.getUNCPath());
1889
1915
}
1890
-
finalStringdir = mediaDir.getPath();
1916
+
}
1917
+
finalStringdir = mediaDir.getPath();
1891
1918
1892
-
// first let's see if this is a subdirectory of any of the media directories already in the list, and error out if so...
1893
-
if (ArrayFunctions.containsStringPrefixingAnotherString(_listFixController.getMediaLibrary().getMediaDirectories(), dir, !ListFixController.FILE_SYSTEM_IS_CASE_SENSITIVE))
1894
-
{
1895
-
JOptionPane.showMessageDialog(this, newJTransparentTextArea("The directory you attempted to add is a subdirectory of one already in your media library, no change was made."),
1896
-
"Reminder", JOptionPane.INFORMATION_MESSAGE);
1897
-
return;
1898
-
}
1899
-
else
1919
+
// first let's see if this is a subdirectory of any of the media directories already in the list, and error out if so...
1920
+
if (ArrayFunctions.containsStringPrefixingAnotherString(_listFixController.getMediaLibrary().getMediaDirectories(), dir, !ListFixController.FILE_SYSTEM_IS_CASE_SENSITIVE))
1921
+
{
1922
+
JOptionPane.showMessageDialog(this, newJTransparentTextArea("The directory you attempted to add is a subdirectory of one already in your media library, no change was made."),
1923
+
"Reminder", JOptionPane.INFORMATION_MESSAGE);
1924
+
return;
1925
+
}
1926
+
else
1927
+
{
1928
+
// Now check if any of the media directories is a subdirectory of the one we're adding and remove the media directory if so.
1929
+
intmatchCount = 0;
1930
+
for (StringdirToCheck : _listFixController.getMediaLibrary().getMediaDirectories())
1900
1931
{
1901
-
// Now check if any of the media directories is a subdirectory of the one we're adding and remove the media directory if so.
1902
-
intmatchCount = 0;
1903
-
for (StringdirToCheck : _listFixController.getMediaLibrary().getMediaDirectories())
1932
+
if (dirToCheck.startsWith(dir))
1904
1933
{
1905
-
if (dirToCheck.startsWith(dir))
1934
+
// Only showing the message the first time we find this condition...
1935
+
if (matchCount == 0)
1906
1936
{
1907
-
// Only showing the message the first time we find this condition...
1908
-
if (matchCount == 0)
1909
-
{
1910
-
JOptionPane.showMessageDialog(this,
1911
-
newJTransparentTextArea("One or more of your existing media directories is a subdirectory of the directory you just added. These directories will be removed from your list automatically."),
1912
-
"Reminder", JOptionPane.INFORMATION_MESSAGE);
1913
-
}
1914
-
removeMediaDir(dirToCheck);
1915
-
matchCount++;
1937
+
JOptionPane.showMessageDialog(this,
1938
+
newJTransparentTextArea("One or more of your existing media directories is a subdirectory of the directory you just added. These directories will be removed from your list automatically."),
0 commit comments