View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000211 | VisualDiffer | General | public | 2013-12-01 12:23 | 2013-12-06 17:13 |
| Reporter | L-1963 | Assigned To | admin | ||
| Priority | high | Severity | block | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | Mac | OS | OS X | OS Version | Mavericks |
| Product Version | 1.5.7 | ||||
| Summary | 0000211: The finder integration workflow does not work on paths including spaces and other characters like parentheses. | ||||
| Description | The finder integration workflow does not work on paths including spaces and other characters like parentheses. | ||||
| Steps To Reproduce | Select two files or two folders where at least one of the two has a path including spaces or other characters like parentheses. Run the service Compare with VisualDifferer. You get a blocking error. | ||||
| Additional Information | A working solution I done and tested is to double quote the arguments passed to the shell command in the AppleScript script included in the workflow, at these lines: do shell script "rm -f \"" & path & "\"" do shell script visdiff_path & " \"" & left_path & "\" \"" & right_path & "\"" do shell script visdiff_path & " \"" & left_path & "\" \"" & right_path & "\"" do shell script "rm \"" & first_selected_holder_path & "\"" | ||||
| Tags | No tags attached. | ||||
|
|
n.txt (2,390 bytes)
## Copyright (c) 2011 Davide Ficano. All rights reserved.
## http://visualdiffer.com
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## Bug fixes, suggestions and comments should be sent to:
## davide.ficano@visualdiffer.com
tell application "Finder"
set selected_files to selection
end tell
set visdiff_path to "/Applications/VisualDiffer.app/Contents/Resources/visdiff"
set user_home to POSIX path of (path to home folder) as text
# Temporary path used to store first path selected
set first_selected_holder_path to user_home & "visualdiffer_cmp"
set files_count to count (selected_files)
on removeFile(path)
do shell script "rm -f \"" & path & "\""
end removeFile
-- display dialog path_holder_path
try
if (files_count = 2) then
removeFile(first_selected_holder_path)
set left_path to (POSIX path of (item 1 in selected_files as text))
set right_path to (POSIX path of (item 2 in selected_files as text))
do shell script visdiff_path & " \"" & left_path & "\" \"" & right_path & "\""
else if (files_count = 1) then
-- try
set posixFile to POSIX file first_selected_holder_path as text
tell application "Finder"
if exists first_selected_holder_path as POSIX file then
set f to (open for access posixFile)
set left_path to (read f for (get eof f))
close access f
set right_path to (POSIX path of (item 1 in selected_files as text))
do shell script visdiff_path & " \"" & left_path & "\" \"" & right_path & "\""
do shell script "rm \"" & first_selected_holder_path & "\""
else
set left_path to (POSIX path of (item 1 in selected_files as text))
set nref to open for access file posixFile with write permission
close access nref
write left_path to file posixFile
end if
end tell
end if
on error errmsg
removeFile(first_selected_holder_path)
display dialog "Error while executing VisualDiffer
" & errmsg buttons {"Close"}
end try |
|
|
Yes, you are right and your fix is perfect. I've integrated your fix and pushed on github thanks |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-12-01 12:23 | L-1963 | New Issue | |
| 2013-12-01 12:23 | L-1963 | Status | new => assigned |
| 2013-12-01 12:23 | L-1963 | Assigned To | => admin |
| 2013-12-01 12:23 | L-1963 | File Added: n.txt | |
| 2013-12-01 14:34 | admin | Note Added: 0000413 | |
| 2013-12-01 14:34 | admin | Status | assigned => resolved |
| 2013-12-01 14:34 | admin | Resolution | open => fixed |
| 2013-12-06 17:13 | admin | Status | resolved => closed |