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())
1908
1910
{
1909
-
UNCFilemediaDir = newUNCFile(mediaFolderToAdd);
1910
-
if (getApplicationConfig().getAlwaysUseUNCPaths())
1911
+
if (mediaDir.onNetworkDrive())
1911
1912
{
1912
-
if (mediaDir.onNetworkDrive())
1913
-
{
1914
-
mediaDir = newUNCFile(mediaDir.getUNCPath());
1915
-
}
1913
+
mediaDir = newUNCFile(mediaDir.getUNCPath());
1916
1914
}
1917
-
finalStringdir = mediaDir.getPath();
1915
+
}
1916
+
finalStringdir = mediaDir.getPath();
1918
1917
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
1918
+
// first let's see if this is a subdirectory of any of the media directories already in the list, and error out if so...
1919
+
if (ArrayFunctions.containsStringPrefixingAnotherString(_listFixController.getMediaLibrary().getMediaDirectories(), dir, !ListFixController.FILE_SYSTEM_IS_CASE_SENSITIVE))
1920
+
{
1921
+
JOptionPane.showMessageDialog(this, newJTransparentTextArea("The directory you attempted to add is a subdirectory of one already in your media library, no change was made."),
1922
+
"Notification", JOptionPane.INFORMATION_MESSAGE);
1923
+
return;
1924
+
}
1925
+
else
1926
+
{
1927
+
// Now check if any of the media directories is a subdirectory of the one we're adding and remove the media directory if so.
1928
+
intremovedFolders = 0;
1929
+
for (StringdirToCheck : newArrayList<>(_listFixController.getMediaLibrary().getMediaDirectories()))
1927
1930
{
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())
1931
+
if (dirToCheck.startsWith(dir))
1931
1932
{
1932
-
if (dirToCheck.startsWith(dir))
1933
-
{
1934
-
// Only showing the message the first time we find this condition...
1935
-
if (matchCount == 0)
1936
-
{
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."),
1939
-
"Reminder", JOptionPane.INFORMATION_MESSAGE);
1940
-
}
1941
-
removeMediaDir(dirToCheck);
1942
-
matchCount++;
1943
-
}
1933
+
// Only showing the message the first time we find this condition...
0 commit comments