Ask a Question related to Ruby, Design and Development.
-
Chris Morris #1
ftools move bug on Windows
ftools.rb
#########
def move from, to, verbose = false
to = catname(from, to)
$deferr.print from, " -> ", to, "\n" if verbose
if RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/ and FileTest.file? to
unlink to
end
fstat = stat(from)
begin
rename from, to
rescue
begin
symlink File.readlink(from), to and unlink from
rescue
from_stat = stat(from)
syscopy from, to and unlink from
utime(from_stat.atime, from_stat.mtime, to)
begin
chown(fstat.uid, fstat.gid, to)
rescue
end
end
end
end
If the rename call fails for something like "Permission denied" -- then
the rescue clause tries to do a .readlink which is not supported on
Windows. Ruby raises that error, and the original exception is hidden.
I'm guessing a fix would be to do a platform regex like earlier in the
method and not attempt the link related items if on Windows, etc.
Workaround is just to use File.rename instead.
--
Chris
[url]http://clabs.org/blogki[/url]
Chris Morris Guest
-
3d drag or move
i've learned the basic of 3ds max. now i'm interested in making an appllication that can interact with users by dragging the mouse. if you are... -
MOVE
PFC wrote: I'd really like to have a sql command, say MOVE, or SELECT AND DELETE, whatever, which acts like a SELECT, returning the rows, but... -
Move Datagrid Row Up/Down
Hi, Anyone have suggestions for how to select a row in a web datagrid and either drag and drop it somewhere else in the grid or use up/down arrows... -
Zoom/ hand move toggle issues, windows xp
I have a copy of Indesign CS on windows Xp pro. The problem I'm having is whenever I select the zoom tool, move the cursor over to the canvas, hold... -
Windows not refreshing on copy or move
My wife's Windows XP (home) has the curious problem of not refreshing. In other words, if I drag and move a file from one window to another,...



Reply With Quote

