Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ec47f1f4 authored by Waldo Bastian's avatar Waldo Bastian

Keep files and directories separate (BR70371)

(toojays: Does this solve it?)
CCMAIL: 70371@bugs.kde.org

svn path=/trunk/kdemultimedia/juk/; revision=297014
parent 72116258
......@@ -980,8 +980,8 @@ void Playlist::loadFile(const QString &fileName, const QFileInfo &fileInfo)
if(item.isRelative())
item.setFile(QDir::cleanDirPath(fileInfo.dirPath(true) + "/" + itemName));
if(MediaFiles::isMediaFile(item.fileName()) && item.exists() &&
item.isFile() && item.isReadable())
if(item.exists() && item.isFile() && item.isReadable() &&
MediaFiles::isMediaFile(item.fileName()))
{
if(after)
after = createItem(item, QString::null, after, false);
......
......@@ -705,12 +705,14 @@ PlaylistItem *PlaylistSplitter::addImpl(const QString &file, Playlist *list, Pla
if(!fileInfo.exists())
return after;
if(MediaFiles::isMediaFile(file))
return list->createItem(fileInfo, QString::null, after, false);
if(fileInfo.isFile() && fileInfo.isReadable()) {
if(MediaFiles::isMediaFile(file))
return list->createItem(fileInfo, QString::null, after, false);
if(m_importPlaylists && MediaFiles::isPlaylistFile(file)) {
openPlaylist(fileInfo.absFilePath());
return after;
if(m_importPlaylists && MediaFiles::isPlaylistFile(file)) {
openPlaylist(fileInfo.absFilePath());
return after;
}
}
if(fileInfo.isDir()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment