From edc693952db5a6ff437046e6ee03be89c64ac62e Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <alan@pippins.net>
Date: Tue, 30 Oct 2012 16:38:37 -0600
Subject: [PATCH] Added some code to correctly chown/chmod the playlists when
 they are created

---
 organize_videos | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/organize_videos b/organize_videos
index 5625f8b..782ee17 100755
--- a/organize_videos
+++ b/organize_videos
@@ -101,7 +101,12 @@ sub create_playlists {
 		print "   Skipping $file since we can't extract the year and month from it\n"; 
 	    }
 	}
-    }
+
+        # Fix the permissions
+        system("chown $owner \"$dstdir/\"*.$playlist_extension");
+        system("chgrp $group \"$dstdir/\"*.$playlist_extension");
+        system("chmod $mode \"$dstdir/\"*.$playlist_extension");
+   } 
 }
 
 # Sanity checks / Option processing
-- 
2.34.1