OSDN Git Service

add warning
authorISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Fri, 2 Nov 2012 17:57:12 +0000 (02:57 +0900)
committerISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Fri, 2 Nov 2012 17:57:12 +0000 (02:57 +0900)
lib/Mubot4FB/FeedWorker.pm

index f8b7327..30f4b54 100644 (file)
@@ -42,7 +42,7 @@ sub work {
                my ($fh, $tmp_file) = tempfile("tmpjsonXXXXXX", DIR => $tmpdir);
                print $fh encode_json($out);
                close($fh);
-               rename $tmp_file, $me->{cfg}->{json_path};
+               rename $tmp_file, $me->{cfg}->{json_path} || warn 'can not rename from ' . $tmp_file . ' to ' . $me->{cfg}->{json_path};
        }
 }