Package: minitube Version: 1.4.1-1 Severity: normal Tags: upstream patch Hi!
Minitube defaults to $HOME/Desktop for downloading videos, however, this path might be inexistent (as it happened to be in my case, because I don't use a Desktop environment like KDE or GNOME). The attached patch tries $HOME when there's no $HOME/Desktop, however, one might want to refactor it a bit, it shouts "code duplication" right now. Instead of using $HOME/Desktop, simply defaulting to $HOME might also work, though this would be a semantic change. Cheers -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.38 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages minitube depends on: ii dbus-x11 1.4.8-2 simple interprocess messaging syst ii gstreamer0.10-ffmpe 0.10.11-4 FFmpeg plugin for GStreamer ii gstreamer0.10-plugi 0.10.21-4+b1 GStreamer plugins from the "bad" s ii gstreamer0.10-plugi 0.10.28-3 GStreamer plugins from the "good" ii gstreamer0.10-x 0.10.32-2 GStreamer plugins for X11 and Pang ii libc6 2.11.2-11 Embedded GNU C Library: Shared lib ii libgcc1 1:4.6.0-4 GCC support library ii libphonon4 4:4.6.0really4.5.0-2 multimedia framework from KDE - co ii libqt4-dbus 4:4.7.2-3 Qt 4 D-Bus module ii libqt4-network 4:4.7.2-3 Qt 4 network module ii libqt4-xml 4:4.7.2-3 Qt 4 XML module ii libqtcore4 4:4.7.2-3 Qt 4 core module ii libqtgui4 4:4.7.2-3 Qt 4 GUI module ii libstdc++6 4.6.0-4 The GNU Standard C++ Library v3 ii phonon 4:4.6.0really4.5.0-2 multimedia framework from KDE - me ii phonon-backend-gstr 4:4.6.0really4.4.4-3 Phonon GStreamer 0.10.x backend minitube recommends no packages. minitube suggests no packages. -- no debconf information
>From 99c39aedaa7ed15942ff8188c7eb8fa400c84053 Mon Sep 17 00:00:00 2001 From: Adrian Knoth <a...@drcomp.erfurt.thur.de> Date: Sat, 23 Apr 2011 12:45:18 +0200 Subject: [PATCH] Use $HOME if $HOME/Desktop isn't available Some environments like Fluxbox don't necessarily have $HOME/Desktop. If the path is missing, use $HOME instead. This should always be available. Signed-off-by: Adrian Knoth <a...@drcomp.erfurt.thur.de> --- src/downloadmanager.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 5363d1e..0f037f6 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -143,6 +143,11 @@ QString DownloadManager::defaultDownloadFolder() { if (!moviesDir.exists()) { // fallback to Desktop path = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); + QDir moviesDir(path); + if (!moviesDir.exists()) { + // fallback to Home + path = QDesktopServices::storageLocation(QDesktopServices::HomeLocation); + } } return path; } -- 1.7.4.4