0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

シンボリックリンク作成時に 「オリジナルの項目が見つからない」エラーの対処法

Posted at

シンボリックリンクを張ると以下のようなエラーが出て失敗してしまったので、その解決備忘録です。

経緯

僕はPhotoshop Script(jsx)を開発する際に、git管理したいので作業環境のjsxをPhotoshopディレクトリ内にシンボリックリンクを張って作業します。

作業環境/hoge.jsx
↓
/Applications/Photoshop 2020/Presets/Scripts/hoge.jsx

以下のおなじみのlnコマンドで張ります。1

$ sudo ln -s '作業環境/hoge.jsx' '/Applications/Photoshop 2020/Presets/Scripts/'

アイコンが何かおかしい。
ダブルクリックしてみると、冒頭のキャプチャのエラーダイアログが表示され失敗したことが分かります。
※ファイルの情報でも確認できます。

解決方法

$ ln -s 元ファイル絶対パス リンク先絶対パス

このように絶対パスでlnコマンドを実行します。

image.png
関連付けされたAtomのアイコンが表示されて、ダブルクリックするとオリジナルファイルが開くようになりました。

成功。

まとめ

シンボリックリンクを張る場合は、相対パスではなく絶対パスを使用する。

  1. /Applications配下--9-9^-9-0^¥-09-0^9-0-09^-090-9-97-アクセス権限的にsudoを使っています
    image.png

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?