Skip to content

fix: remove chmod when attempting to write to file#1

Draft
GandalfDG wants to merge 201 commits intomasterfrom
group_permission
Draft

fix: remove chmod when attempting to write to file#1
GandalfDG wants to merge 201 commits intomasterfrom
group_permission

Conversation

@GandalfDG
Copy link
Owner

@GandalfDG GandalfDG commented May 2, 2023

If a file doesn't give its owner write permission, it may be for a good reason. Also, if the file isn't writable because the user isn't the owner of the file, the chmod will fail.

This was causing issues in the case where a user has permission to write to a file because they belong to the group that owns the file, but aren't the file's owning user.

@GandalfDG GandalfDG closed this May 2, 2023
@GandalfDG GandalfDG reopened this May 2, 2023
@GandalfDG
Copy link
Owner Author

Got around to making this work, though it took figuring out that the electron/configs are in yet another separate config file from the graph's config.edn and the global config.edn. Should this be added as an option in the settings UI (probably on the advanced page?)

andelf and others added 20 commits July 18, 2023 22:06
fix: dev warnings from react about missing keys

Fix logseq#9872
[why]
Sorting the keys gives the advantage of having strings with same context
together making it easier to have consistency on translations.

[how]
1. Having a .edn file execute:
	grep ":" src/resources/dicts/es.edn | grep -v "/" | sort > single_keys
	grep ":" src/resources/dicts/es.edn | grep "/" | sort > hierarchical_keys
2. Both files are sorted, now manually merge them into sorted_file. I
   decided to left turial keys on top, then single_keys and finally
   hierarchical_keys at the end. Check the braces.
3. Execute this script:
	#!/bin/bash

	while IFS= read -r line; do
	if [[ "$line" == *\"* ]]; then
		first_quote_index=$(expr index "$line" \")
		content_after_quote="${line:$first_quote_index}"
		content_before_quote="${line:0:$first_quote_index-1}"
		spaces=$(printf '%*s' $((52 - ${#content_before_quote})))
		echo "$content_before_quote$spaces\"$content_after_quote"
	else
		echo "$line"
	fi
	done <sorted_file >formatted_file
4. Replace the .edn file with the resultant formated_file. Now all
   strings start at column 53.
* Update Norwegian translation

* Update two strings

* Update Norwegian translation
xyhp915 and others added 29 commits September 6, 2023 14:42
* hide window until theme is loaded

* show window on db-restored

* move manage call to handle maximized state

* hook on theme load
* enhance(api): add page to recent for route api

* enhance(api): support open block in right sidebar with entity id
…imestamp (addresses logseq#9920) (logseq#9930)

* youtube.cljs: allow for single-digit minutes and seconds in youtube-timestamp (addresses logseq#9920)

* youtube.cljs: parse "<number>:<number>" as MM:SS to be consistent with the UI display

*NOTE that with this commit, we essentially pass util/safe-parse-int a
value we do not say it can take (although it works): nil. This will be
fixed in a subsequent commit.

* youtube.cljs: remove unreachable branches from cond in parse-timestamp

* frontend/util.cljc: update safe-parse-int to accept nil as well. TODO:
need help fixing malli schema!

* fix: parse timestamp

---------

Co-authored-by: charlie <xyhp915@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.