diff options
Diffstat (limited to 'audio/easymp3gain/patches/02_filechooser.patch')
-rw-r--r-- | audio/easymp3gain/patches/02_filechooser.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/audio/easymp3gain/patches/02_filechooser.patch b/audio/easymp3gain/patches/02_filechooser.patch new file mode 100644 index 0000000000..386602804f --- /dev/null +++ b/audio/easymp3gain/patches/02_filechooser.patch @@ -0,0 +1,27 @@ +Description: Ignore some files after selecting a directory. + Hidden or not writeable files cause easyMp3Gain to crash sometimes. +Forwarded: yes +Author: Matthias Klumpp <matthias@nlinux.org> +Last-Update: 2010-06-28 + +--- a/unitmain.pas ++++ b/unitmain.pas +@@ -263,6 +263,10 @@ + begin + if (ExtractFileExt(SR.Name)='.'+Extension[i]) and + not ((faDirectory and SR.Attr)=faDirectory) then ++ {$IFDEF Unix} ++ //Check if file is writeable and not hidden ++ if (SR.Name[1]<>'.')and(fpaccess(FilePath + SR.Name ,W_OK)=0) then ++ {$ENDIF} + ListBox.Add(FilePath + SR.Name); + end; + if (SubLevelMax>0) and (((faDirectory or faSymLink) and SR.Attr)=faDirectory) then //Directories +@@ -670,6 +674,7 @@ + sublevels: Byte; + begin + if not SelectDirectoryDialog.Execute then exit; ++ if not DirectoryExists(SelectDirectoryDialog.FileName) then exit; + Application.ProcessMessages; + if Sender=mnuFileAddFolderRecursive then + sublevels := MediaGainOptions.SubLevelCount |