Opened 15 years ago
Closed 15 years ago
#5822 closed defect (duplicate)
lyx2lyx (and other things) will choke on pathnames with quotes
Reported by: | Owned by: | José Matos | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | lyx2lyx | Version: | 1.6.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
When opening a Lyx 1.4.x file on my removable hard drive with Lyx 1.6.1, the
file fails to open and gives an error that the lyx2lyx script failed to convert
it. However, if I drag that same file to the desktop (on my root hard drive) and
open it, everything works fine.
A very similar problem is described here:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg61783.html
This might be a permissions issue, but I confirmed that my removable disk has
rwx permissions for my user account. LyX has no trouble saving new files to that
same disk.
I'm running Lyx 1.6.1 from the hardy-backports repo on Ubuntu Hardy.
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Works for me, too, under Fedora 8. But I'm going to confirm, since we've seen
this same behavior before.
Is it possible that the pen drive exists at various places in the filesystem,
and that LyX is trying to access it as /bad/location/ rather than as
/good/location? Desktops often put pendrives at various places, and who knows
what then happens if Qt "resolves" links.
Softlinks can act very weird, especially when using things like "..". I mean,
suppose that $HOME/link/ points at /cvs/dir. Then doing:
cd $HOME/link/..
drops you in $HOME/, but
ls $HOME/link/..
will show you /cvs/. Better yet, try this. Say we're in $HOME. Type:
cp link/
and now hit TAB, for completion. It'll show you what's in $HOME. Now choose a
file and finish the command:
cp $HOME/link/myfile .
Response:
cp: cannot stat `link/../myfile': No such file or directory
That's because it's looking for /cvs/myfile. So what completion showed you isn't
what cp will actually do.
Anyway, the reporter might try running LyX from a shell with the "-dbg files"
option and see if anything turns up.
comment:3 by , 15 years ago
I checked ~/.xsession-errors after trying to open an old LyX file with the new
version, and here's the error message that I received:
begin
sh: Syntax error: Unterminated quoted string
Error: Conversion script failed
/media/truecrypt1/Justin's Documents/Dissertation Stuff/Final Dissertation
Draft/Complete Dissertation.lyx is from a different version of LyX, but the
lyx2lyx script failed to convert it.
end
When I run LyX from a shell using the -dbg files option, I get a longer version
of the same message:
begin
../../../src/support/FileName.cpp(551): Checksumming "/media/truecrypt1/Justin's
Documents/Dissertation Stuff/Final Dissertation Draft/Complete Dissertation.lyx"
2756744994 lasted 2 ms.
../../../src/support/FileName.cpp(424): Temporary file in
/tmp/lyx_tmpdir.J11599/Buffer_readFile
../../../src/support/FileName.cpp(412): Temporary file
`/tmp/lyx_tmpdir.J11599/Buffer_readFile.M11599' created.
sh: Syntax error: Unterminated quoted string
Error: Conversion script failed
/media/truecrypt1/Justin's Documents/Dissertation Stuff/Final Dissertation
Draft/Complete Dissertation.lyx is from a different version of LyX, but the
lyx2lyx script failed to convert it.
end
Any thoughts?
comment:4 by , 15 years ago
op_sys: | other → All |
---|---|
rep_platform: | Other → All |
Summary: | lyx2lyx not working on removable disk → lyx2lyx (and other things) will choke on pathnames with quotes |
Version: | 1.6.1 → 1.6.2 |
The problem is the single quote in the pathname. I just created a file called
"t's.lyx" and LyX chokes trying to open it. From a quick look at the code
(support/filetools.cpp, quoteName() routine), I see this is a known problem. But
I don't see a bug about it, so I'm renaming this one.
So the bug is as now described.
comment:5 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
* This bug has been marked as a duplicate of 4063 *
I can not confirm this. It works for me.
There two options to further debug this problem.
When repeating this procedure look into $HOME/.xsession-errors at the end.
All the details why lyx2lyx fails can be found there.
The other option is to use a console, go to the directory while the lyx file is
after the pen is mounted and see what lyx outputs.
Note that this type of problem is different from the one you refer. In the
former case lyx2lyx would always fail on not only if called from a pen.