slackbuilds_ponce/audio/easymp3gain/patches/02_filechooser.patch
Chernov V. V 2ed9e80c54 audio/easymp3gain: Added (GUI for mp3gain, aacgain, and vorbisgain)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2012-08-13 02:04:47 -05:00

27 lines
1,017 B
Diff

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