Code Monkey home page Code Monkey logo

Comments (2)

mtgto avatar mtgto commented on August 17, 2024 2

~/Library/Containers/net.mtgto.inputmethod.macSKK/Data はサンドボックス化したmacOSアプリの隔離されたファイルを配置するためのフォルダ (App Container) なので、サンドボックス外へのシンボリックリンクを置いても読むことができません。

現状の実装ではシンボリックリンクは辞書一覧にも表示されないように弾いています。
https://github.com/mtgto/macSKK/blob/0.15.0/macSKK/UserDict.swift#L324-L326
試しに URL#isRegularFile かどうかを見ている条件分岐を外して有効な辞書として読み込もうとするとApp Sandbox侵害により次のようなエラーが発生します。

SKK辞書 SKK-JISYO.test.utf8 の読み込みに失敗しました!: Error Domain=NSCocoaErrorDomain Code=257 "ファイル“SKK-JISYO.test.utf8”を表示するためのアクセス権がないため、開けませんでした。" UserInfo={NSFilePath=/Users/username/Library/Containers/net.mtgto.inputmethod.macSKK/Data/Documents/Dictionaries/SKK-JISYO.test.utf8, NSUnderlyingError=0x600001e28240 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}

Neovimプラグイン側で macSKKのコンテナフォルダ内 (~/Library/Containers/net.mtgto.inputmethod.macSKK/Data/Documents/Dictionaries) に辞書ファイルを置いたり、macSKKのコンテナフォルダに辞書ファイルを置きそちらからneovimの辞書フォルダ? のような場所にシンボリックリンクを作るのは難しいでしょうか?

from macskk.

peacock0803sz avatar peacock0803sz commented on August 17, 2024

ありがとうございます。プラグイン側でシンボリックリンクを作成する処理できそうです。

from macskk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.