소스 검색

Fix bug where repeat invocations of sourcedir returned different results (due to abuse of sourcefilename memore address)

1991
urlysses 7 년 전
부모
커밋
f0cac5c8f2
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. +3
    -1
      1991.fs

+ 3
- 1
1991.fs 파일 보기

@@ -19,9 +19,11 @@ include unix/socket.fs
\ Useful for specifying in which dir to find
\ specific files (e.g., public/, views/).
sourcefilename \ get the name of our file
pad dup >r place \ copy the string so we don't
r> count \ modify sourcefilename.
2dup reverse \ reverse and search for first /
s" /" search if \ if found, reverse string to
2dup reverse \ to strip the filename but keep dir.
2dup reverse \ strip the filename but keep dir.
else
2drop \ no slash,
s" ./" \ same dir execution.


불러오는 중...
취소
저장