Bug 55529 - Have Juk resolve symlinks or optionally not follow them
Summary: Have Juk resolve symlinks or optionally not follow them
Status: RESOLVED FIXED
Alias: None
Product: juk
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-05 00:54 UTC by Lauri Watts
Modified: 2004-07-31 08:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauri Watts 2003-03-05 00:54:28 UTC
Version:           3.1.0 (using KDE 3.1.9)
Compiler:          gcc version 2.95.4 20020320 [FreeBSD]
OS:          FreeBSD (i386) release 4.7-STABLE

It would be nice if JuK didn't follow symlinks in monitored directories, or could resolve them and not show entries in the collection list that are effectively duplicates of the same actual file.

For example, I have a whole lot of directories in the form /net/music/<artist> and several in the form /net/music/<genre> and in some of the <genre> directories, I have a symlink to some of the artists.  In JuK, any files that are under the symlinks show up twice in the Collection list, it seems to me it would be cleaner if they didn't.
Comment 1 Scott Wheeler 2003-03-06 01:29:20 UTC
Subject: Re: Have Juk resolve symlinks or optionally not follow them

Thank you for your bug report.
The feature that you requested has been implemented in the latest
development (CVS) version of KDE. The feature request will be closed.

Comment 2 Scott Wheeler 2004-07-31 02:24:38 UTC
Lauri says that this is happening again.
Comment 3 Michael Pyne 2004-07-31 08:08:01 UTC
CVS commit by mpyne: 

Fix bug 55529 again by using the handy resolveSymLinks() function in every
place where the FileHandle's path can be set, and when comparing with the
Cache.

CCMAIL:55529-done@bugs.kde.org


  M +4 -4      filehandle.cpp   1.13


--- kdemultimedia/juk/filehandle.cpp  #1.12:1.13
@@ -108,5 +108,5 @@ FileHandle::FileHandle(const QString &pa
     d = new FileHandlePrivate;
     d->fileInfo = QFileInfo(path);
-    d->absFilePath = path;
+    d->absFilePath = resolveSymLinks(path);
     read(s);
     Cache::instance()->insert(*this);
@@ -131,5 +131,5 @@ void FileHandle::setFile(const QString &
         setup(QFileInfo(path), path);
     else {
-        d->absFilePath = path;
+        d->absFilePath = resolveSymLinks(path);
         d->fileInfo.setFile(path);
     }
@@ -241,5 +241,5 @@ void FileHandle::setup(const QFileInfo &
     QString fileName = path.isNull() ? info.absFilePath() : path;
 
-    FileHandle cached = Cache::instance()->value(fileName);
+    FileHandle cached = Cache::instance()->value(resolveSymLinks(fileName));
 
     if(cached != null()) {
@@ -250,5 +250,5 @@ void FileHandle::setup(const QFileInfo &
         d = new FileHandlePrivate;
         d->fileInfo = info;
-        d->absFilePath = fileName;
+        d->absFilePath = resolveSymLinks(fileName);
         d->modificationTime = info.lastModified();
         Cache::instance()->insert(*this);