Issue Details (XML | Word | Printable)

Key: BR-393
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Rein
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Bromine

Deleting a project in a non-windows environment gives errors

Created: 23/Sep/10 04:00 AM   Updated: 18/Oct/10 05:34 AM
Component/s: Any
Affects Version/s: 3.0 RC 2
Fix Version/s: None

File Attachments: 1. Text File bromine-php-project-delete.patch (0.9 kB) 18/Oct/10 05:34 AM - Rein

Environment: Mac OSX, Debian Linux, PHP 5.3.2


 Description  « Hide

Deleting a project in a non-windows environment gives warnings and errors because it cannot delete the testscript directories. The problem lies in this line in project_controller.php:

$array_items = array_merge($array_items, $this->directoryToArray($directory. "
" . $file, $recursive));

It uses a windows-only directory seperator (backslash, ) instead of the directory seperator (DS) constant. Because the directories aren't deleted, the next time a project is created with the same name it throws errors too (because the directories already exist).

Fix: resplace "
" with DS:
$array_items = array_merge($array_items, $this->directoryToArray($directory. DS . $file, $recursive));



Sort Order: Ascending order - Click to sort in descending order
Rein added a comment - 23/Sep/10 04:04 AM

This is the same problem as stated in BR-382


Rein added a comment - 18/Oct/10 05:06 AM

Replace

$array_items = array_merge($array_items, $this->directoryToArray($directory. "
" . $file, $recursive));
with:
$array_items = array_merge($array_items, $this->directoryToArray($directory. DS . $file, $recursive));


Rein added a comment - 18/Oct/10 05:34 AM

Patch for the fix above.