diff -Naur drupal-6.8.old/includes/locale.inc drupal-6.8/includes/locale.inc --- drupal-6.8.old/includes/locale.inc 2008-12-10 19:29:36.000000000 -0200 +++ drupal-6.8/includes/locale.inc 2008-12-14 23:12:34.000000000 -0200 @@ -2185,20 +2185,22 @@ $status = 'deleted'; } - // Only create a new file if the content has changed. - if ($data && $language->javascript != $data_hash) { - // Ensure that the directory exists and is writable, if possible. - file_check_directory($dir, TRUE); - - // Save the file. + // Only create a new file if the content has changed or if the file does not exist. + if ($data) { $dest = $dir .'/'. $language->language .'_'. $data_hash .'.js'; - if (file_save_data($data, $dest)) { - $language->javascript = $data_hash; - $status = ($status == 'deleted') ? 'updated' : 'created'; - } - else { - $language->javascript = ''; - $status = 'error'; + if (!file_exists($dest) || $language->javascript != $data_hash) { + // Ensure that the directory exists and is writable, if possible. + file_check_directory($dir, TRUE); + + // Save the file. + if (file_save_data($data, $dest)) { + $language->javascript = $data_hash; + $status = ($status == 'deleted') ? 'updated' : 'created'; + } + else { + $language->javascript = ''; + $status = 'error'; + } } }