Red Hat Bugzilla – Full Text Bug Listing
|Summary:||csprocessor complains about directory when *file* exists|
|Product:||[Community] PressGang CCMS||Reporter:||Joshua Wulf <jwulf>|
|Component:||CSProcessor||Assignee:||Lee Newson <lnewson>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:|
|Fixed In Version:||0.22.6||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2013-06-06 21:31:35 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Joshua Wulf 2012-03-28 07:34:51 EDT
[jwulf@nitai scratch]$ csprocessor create Test_Book_Template CSProcessor client version: 0.22.5 Loading configuration from /home/jwulf/.config/csprocessor.ini Connecting to Skynet server: http://skynet.usersys.redhat.com:8080/TopicIndex/ ERROR: A directory already exists for the Content Specification. Please check the "/home/jwulf/public_html/scratch/Test_Book_Template" directory first and if it's correct, then use the --force option. Test_Book_Template exists, but is actually the content spec file that I'm checking in. [jwulf@nitai scratch]$ ls Content_Spec_Processor_2 Content_Spec_Processor_2~ Content_Spec_Processor_Guide Docbook+RDFa Existing_Content_Spec Existing_Content_Spec_Tutorial Test_Book_Template Not sure if there is a strategy to deal with this situation (other than telling people to name the content spec something else - or perhaps the Name[+1] approach); but maybe csprocessor could check if it's in fact a file or a directory and give an appropriate error. Suggestion: "A file named Test_Book_Template exists here. You could move this file, or execute this command in another directory." "A directory named Test_Book_Template already exists here. You could move this directory, execute this command in another directory, or overwrite the Test_Book_Template directory using the --force option." cspclient-0.22.5-1.noarch OS: Fedora release 16 (Verne) JAVA: java version "1.7.0_b147-icedtea" OpenJDK Runtime Environment (fedora-2.1.fc16.1-x86_64) OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
Comment 1 Lee Newson 2012-03-28 19:17:38 EDT
Fixed in 0.22.6 Really you should be using identifying methods (ie filename extensions) but none the less I've done a fix. Cause: The check wasn't checking if the output was a file or a directory. Consequence: An error message would be displayed on the create command if a file existed that had the same name as the output directory. Fix: Make the check see if the output is a file or a directory. If its a directory print the error message, otherwise continue with the normal processing. Note: there is no need to print an error message if the file exists. it is only relevant for directories.
Comment 2 Lee Newson 2013-06-06 21:31:35 EDT
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.