1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 07:52:50 -05:00

clipboard: simplify copyFile, fix copy image from history

This commit is contained in:
bbedward
2026-01-26 21:49:09 -05:00
parent 511502220f
commit 122fb16dfb
42 changed files with 345 additions and 387 deletions

View File

@@ -116,12 +116,12 @@ func (m *Manager) Install(plugin Plugin) error {
return fmt.Errorf("plugin already installed: %s", plugin.Name)
}
if err := m.fs.MkdirAll(m.pluginsDir, 0755); err != nil {
if err := m.fs.MkdirAll(m.pluginsDir, 0o755); err != nil {
return fmt.Errorf("failed to create plugins directory: %w", err)
}
reposDir := filepath.Join(m.pluginsDir, ".repos")
if err := m.fs.MkdirAll(reposDir, 0755); err != nil {
if err := m.fs.MkdirAll(reposDir, 0o755); err != nil {
return fmt.Errorf("failed to create repos directory: %w", err)
}
@@ -168,7 +168,7 @@ func (m *Manager) Install(plugin Plugin) error {
metaPath := pluginPath + ".meta"
metaContent := fmt.Sprintf("repo=%s\npath=%s\nrepodir=%s", plugin.Repo, plugin.Path, repoName)
if err := afero.WriteFile(m.fs, metaPath, []byte(metaContent), 0644); err != nil {
if err := afero.WriteFile(m.fs, metaPath, []byte(metaContent), 0o644); err != nil {
return fmt.Errorf("failed to write metadata: %w", err)
}
} else {