weird bug
parent
4595859a18
commit
19a2d7bdd9
13
README.md
13
README.md
|
@ -16,18 +16,19 @@ Now the default directory and todo list file have better default permissions:
|
||||||
# Todos
|
# Todos
|
||||||
|
|
||||||
- **Really weird bug to solve**: `~/.rodo/todo.txt`'s file permissions change from `rw-------` to `rw-rw-r--` or `rw-rw-rw` after being modified
|
- **Really weird bug to solve**: `~/.rodo/todo.txt`'s file permissions change from `rw-------` to `rw-rw-r--` or `rw-rw-rw` after being modified
|
||||||
- For example, while in your home directory, run `touch test.txt` to create a test file in your home directory
|
- For example:
|
||||||
- While in your home directory, run `racket` to open a Racket REPL
|
1. Create a `test.txt` file somewhere
|
||||||
- Run the following to set `600` file permissions on the file:
|
2. Open a Racket REPL
|
||||||
|
3. Run the following to set `600` file permissions on the file:
|
||||||
```racket
|
```racket
|
||||||
(file-or-directory-permissions "test.txt" #o600)
|
(file-or-directory-permissions "test.txt" #o600)
|
||||||
```
|
```
|
||||||
- Run `ls -l` to check the file permissions
|
4. Run `ls -l` to check the file permissions
|
||||||
- Run the following to modify the file:
|
5. Run the following to modify the file:
|
||||||
```racket
|
```racket
|
||||||
(display-to-file "this is a test" "test.txt" #:mode 'text #:exists 'replace)
|
(display-to-file "this is a test" "test.txt" #:mode 'text #:exists 'replace)
|
||||||
```
|
```
|
||||||
- Run `ls -l` to check the file permissions to see that they have changed to either `rw-rw-r--` or `rw-rw-rw`
|
6. Run `ls -l` to check the file permissions to see that they have changed to either `rw-rw-r--` or `rw-rw-rw`
|
||||||
- So far, the only solution I know of would be to do:
|
- So far, the only solution I know of would be to do:
|
||||||
```racket
|
```racket
|
||||||
(begin
|
(begin
|
||||||
|
|
Loading…
Reference in New Issue