Menu

#81 open fails 'no such user' and my workaround

open
nobody
None
5
2011-01-13
2011-01-13
Neil Bryant
No

I have a number of epub files which I was opening and modifying. Some contain files in the root with names like "~filename.ext" attempting to mount these consistently chokes with a 'no such user filename' error.

zipvfs.tcl contains the following line:
559 FAKEDIR toc [file dirname $name]

On Linux, dirname treats a leading tilde as the home directory, and blows up when the user doesn't exist. I kludged around it with the following change:
559 FAKEDIR toc [file dirname .[file separator]$name]

Since I'm not messing with those files, that's all I needed. I expect that they would blow up other places, but I could code around it by using an absolute path. Can't do that with mount, though, because it calls 'open' internally.

There's most likely a better way to fix it; but I tried [file join...] first, which also failed with a bad user msg.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.