Fixed a few bugs
[videoscripts/.git] / move_videos_from_watchdir
index 83ec63fa50364c5678fba0cfd491a957f8da6c77..364ade6575180ba5644e87ada1a9ba7db8f0238d 100755 (executable)
@@ -78,6 +78,12 @@ foreach $watchpath (split(';', $watchpathname)) {
        $srcfile = $file;
        $dstfile = "$dstpathname/$file";
 
+        # Make sure srcdir is group writable
+        if(not -w "$srcdir") {
+           print "-W- srcdir is not group writable, can't move videos out of it: $srcdir\n";
+           next;
+        } 
+
        # Make sure we have a unique dstfile
        if(-f "$dstfile") {
            $video_ext = $srcfile;