Fix rb-site to better handle empty directories.

Review Request #1600 — Created May 20, 2010 and submitted

chipx86
Review Board
master
1468
reviewboard
Fix rb-site to better handle empty directories.

If a user attempted to install a site using rb-site and ended up having
to start over, we would sometimes leave behind an empty directory. A second
attempt would tell the user that they needed to be an administrator, which
was misleading.

The error is now updated saying to also make sure that the user doesn't
have any files in that directory. We also attempt to remove the directory
first, if possible.
Created a site in a new directory without problems. Then created an empty directory (which would previously trip this up) and ran rb-site install on it. It acted as if the directory was never there. Running it on a directory with files provided a more clear error message.
Loading...