clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.72k stars 671 forks source link

Make mood files hidden in NTFS #4741

Closed Yanpas closed 8 years ago

Yanpas commented 9 years ago

Win explorer shows files starting with dot by default. Add to mood files attribute Hidden. System command: ATTRIB +H

santigl commented 9 years ago

How about adding these lines to function MoodbarLoader::RequestFinished (defined in src/moodbar/moodbarloader.cpp) after the write to mood_filename?

#ifdef Q_OS_WIN32
        if (!SetFileAttributes((LPCTSTR)mood_filename.utf16(),
                               FILE_ATTRIBUTE_HIDDEN)) {
          qLog(Warning) << "Error changing hidden attribute for file"
                        << mood_filename;
        }
#endif

I can't test it on Windows, but if someone confirms it works I can send the patch.

Chocobozzz commented 9 years ago

@santigl You can make a pull request :)

Yanpas commented 9 years ago

I can test it on windows. Hope this [atch works with non-ascii file names

narunlifescience commented 8 years ago

@hatstand I think this issue should be closed..