Ticket #87 (closed バグ指摘: 修正済)

Opened 17 years ago

Last modified 17 years ago

Windowsでのバックアップ処理

Reported by: kakinaka Owned by: somebody
Priority: Milestone: EC-CUBE
Component: 管理画面 Version: 1.3系
Keywords: Cc:
修正済み:

Description

バックアップ処理で eccube/html/user_data/bkupに作業用ディレクトリを作成し、tar.gzに固めて作業ディレクトリを削除するという処理があると思いますが、Windowsではエラーがでます。 FedoraCore?4では出ないし他の方も騒いでいないようなので、環境の問題なのですが(汗)。

Warning: rmdir(W:/www/eccube/html/user_data/bkup/hoge//css) [function.rmdir]: Permission denied in W:\www\eccube\data\lib\slib.php on line 2532

WindowsXPにXSASを入れてテストしてますので、バグというよりは環境が保障対象外なだけなのですが、エラーがでる原因がわかりましたので報告します。

eccube/data/lib/slib.phpの 引用:

指定したフォルダ内のファイルを全て削除する function sfDelFile($dir){ $dh = opendir($dir); フォルダ内のファイルを削除 while(false !== ($file = readdir($dh))){ if ($file == "." or $file == "..") continue; $del_file = $dir . "/" . $file; if(is_file($del_file)){ $ret = unlink($dir . "/" . $file); }else if (is_dir($del_file)){ $ret = sfDelFile($del_file); }

if(!$ret){ return $ret; } } フォルダを削除 closedir($dh); ← ここ追加 return rmdir($dir);

}

ようはカレントディレクトリにいるからカレントディレクトリが削除できなかったみたいです。 closedirで直りました。

Change History

comment:1 Changed 17 years ago by kakinaka

  • Status changed from new to closed
  • Resolution set to 修正済

対応しました。

垣中

Note: See TracTickets for help on using tickets.