Skip to content

Commit

Permalink
v0.085
Browse files Browse the repository at this point in the history
  • Loading branch information
Guevara-chan authored Nov 22, 2020
1 parent c1e3bc6 commit a2aa7f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/auxiliary/help.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const core_help* = [
"\a\x03>\a\x06Midday Commander\a\x05 retrofuturistic file manager v0.08",
"\a\x03>\a\x06Midday Commander\a\x05 retrofuturistic file manager v0.085",
"\a\x03>\a\x05Developed in 2*20 by \a\x04Victoria A. Guevara",
"\a\x01===================================================================================",
"\a\x02ESC:\a\x01 switch between dir & console views OR deny alert choice OR cancel task",
Expand Down
10 changes: 5 additions & 5 deletions src/main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ when not defined(Meta):

proc truePath(path: string, follow_symlink = true): string =
when defined(windows):
proc GetFinalPathNameByHandle(hFile:Handle, lpszFilePath:WideCStringObj, cchFilePath, dwFlags:int32):int32
proc GetFinalPathNameByHandle(hFile:Handle, lpszFilePath: WideCString, cchFilePath, dwFlags:int32):int32
{.stdcall, dynlib: "kernel32", discardable, importc: "GetFinalPathNameByHandleW".}
let
handle = createFileW(newWideCString(path), 0'i32, 0'i32, nil, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS or (FILE_FLAG_OPEN_REPARSE_POINT * (1-follow_symlink.int)), 0)
length = GetFinalPathNameByHandle(handle, newWideCString(" "), 0, 0)
buffer = newWideCString(" ".repeat(length))
buffer: WideCString = newWideCString(" ".repeat(length))
defer: discard closeHandle(handle)
if length == 0: return path
GetFinalPathNameByHandle(handle, buffer, len(buffer), 0)
GetFinalPathNameByHandle(handle, buffer, buffer.len, 0)
return ($buffer).replace(r"\\?\", "")
else: return expandSymlink path

Expand Down Expand Up @@ -1067,7 +1067,7 @@ when not defined(FileViewer):
write line.convert(srcEncoding=cmd_cp).fit_left(self.hcap+len_shift), self.fg, raw=self.hide_colors
write if fullscreen: "\n" else: rborder, self.brd_color
# Footing render.
with(host):
with host:
write if fullscreen: "" else: ""
write "".repeat(self.hcap - fullscreen.int * 2), self.brd_color, self.bg
write if fullscreen: "" else: ""
Expand Down Expand Up @@ -1148,7 +1148,7 @@ when not defined(MultiViewer):
proc navigate(self: MultiViewer, path: string) =
discard self.active.chdir path
proc transfer(self: MultiViewer; src, dest: string; file_proc: proc(src, dest: string), destructive=false): bool =
proc transfer(self:MultiViewer; src, dest:string; file_proc: proc(src, dest:sink string), destructive=false):bool =
proc tick(now_processing: string) = watcher.tick now_processing # aux binding.
if not (dest.fileExists or dest.dirExists) or # Checking if dest already exists.
warn(&"Are you sure want to overwrite \n{dest.extractFilename}\n") > 0:
Expand Down
2 changes: 1 addition & 1 deletion src/nim.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--d:release
--gc:boehm
--gc:arc
--out:"../test.exe"
--warning[LockLevel]:off
--warning[Deprecated]:off

0 comments on commit a2aa7f5

Please sign in to comment.