CS2103-AY1819S2-W16-1 / main

UniLA
https://cs2103-ay1819s2-w16-1.github.io/main/
0 stars 1 forks source link

Photo command does not allow for spaces in filepath or filename, but not specified in documentation #171

Closed nus-se-bot closed 5 years ago

nus-se-bot commented 5 years ago

Describe the bug Using the photo command to add a photo to a Person throws a prompt result "The path of the photo is invalid. ". Upon further checking, the path is valid .However, as the pathname contains spaces " ", either in the filename or the folder names along the path, the photo command does not parse fully the entire path.

To Reproduce Steps to reproduce the behavior:

  1. Copy a photo to a filepath containing spaces " " in the folder names or image name
  2. Use the photo command to add the photo to a Person
  3. See error

Expected behavior The specified photo is added to the Person, and displays in the Person card.

Screenshots image

Additional context While photos may be renamed, it may be useful to specify in the user guide the restriction on folder names and filenames, as well as specify it in the CommandResult. Otherwise, a workaround is needed.


Reported by: @shaungohsc Severity: Medium

[original: nus-cs2103-AY1819S2/pe-dry-run#671]

yinya998 commented 5 years ago

This is because the argument is trimmed by white space. Fixed alr.