vscode-ibmi icon indicating copy to clipboard operation
vscode-ibmi copied to clipboard

Cannot use "Save As..." to create new member or stream file

Open jkyeung opened this issue 10 months ago • 4 comments

If you attempt to use "Save As..." to make a renamed copy of the member or stream file that is already open, VS Code will tell you that the target already exists, even though it doesn't, and ask you to confirm the "overwrite". If you confirm, it gives you the error "Failed to save {name of the existing file}: No such file".

The only way I know to make it work is to create the target using some other means, and then do the overwrite.


Context Version
Code for IBM i version 2.9.0
Visual Studio Code version 1.88.1
Operating System win32_x64
Active extensions
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.4.0
Emmet (emmet): 1.0.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
IBM i Debug (ibmidebug): 1.0.0
JSON Language Features (json-language-features): 1.0.0
Jupyter (jupyter): 2024.3.1
Jupyter Notebook Renderers (jupyter-renderers): 1.0.17
Merge Conflict (merge-conflict): 1.0.0
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Overtype (overtype): 0.5.0
Pylance (vscode-pylance): 2024.4.1
Python (python): 2024.4.1
Python Debugger (debugpy): 2024.4.0
Python Indent (vsc-python-indent): 1.18.0
RPGLE (vscode-rpgle): 0.26.5
Rainbow CSV (rainbow-csv): 3.11.0
Rewrap (rewrap): 1.16.3
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0

Remote system
Setting Value
IBM i OS V7R4M0
Tech Refresh 9
CCSID 37
Default CCSID 37
SQL Disabled
Source dates Enabled

Enabled features

/QOpenSys/pkgs/bin /usr/bin /QSYS.lib/ILEDITOR.lib /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin
bash attr GETNEWLIBL.PGM QZDFMDB2.PGM startDebugService.sh
git iconv
grep setccsid
ls tar
md5sum
sort
stat
Shell env
BUILDLIB=*CRTDFT
CURLIB=*CRTDFT
HOME=/home/JYEUNG
HOST=SYSIDEV.ALLIEDBEVERAGE.COM
LIBLS=ABGTSTLIB JYEUNG CWLIB FANDA QS36F ABGDTALIB ABGPGMLIB QGPL QTEMP
LOGIN=jyeung
LOGNAME=jyeung
MAIL=/var/spool/mail/jyeung
OLDPWD=/home/JYEUNG
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/JYEUNG
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=10.12.16.41 57671 22
SSH_CONNECTION=10.12.16.41 57671 10.30.11.100 22
TZ=<EST>5<EDT>,M3.2.0,M11.1.0
USER=jyeung
USERNAME=jyeung
WORKDIR=/home/JYEUNG
_=/QOpenSys/pkgs/bin/env
Variants
{
  "american": "#@$",
  "local": "#@$"
}
Errors
[
  {
    "command": "/QOpenSys/usr/bin/qsh",
    "code": 1,
    "stderr": "CPF2111:  Library ILEDITOR already exists.",
    "cwd": "/home/JYEUNG"
  },
  {
    "command": "ls -p /QIBM/UserData/IBMiDebugService/certs/debug_service.pfx",
    "code": 2,
    "stderr": "ls: cannot access '/QIBM/UserData/IBMiDebugService/certs/debug_service.pfx': No such file or directory",
    "cwd": "/home/JYEUNG"
  },
  {
    "command": "ls -p /QIBM/UserData/IBMiDebugService/certs/debug_service.pfx",
    "code": 2,
    "stderr": "ls: cannot access '/QIBM/UserData/IBMiDebugService/certs/debug_service.pfx': No such file or directory",
    "cwd": "/home/JYEUNG"
  }
]

jkyeung avatar Apr 23 '24 18:04 jkyeung

I was just about to write up this same problem. So it is not just you.

JonFP avatar May 01 '24 15:05 JonFP

I don't believe there is an easy way for us to make save as work for streamfiles or members. I tried many months ago with much failure due to some API limitations. I will take a look again.

worksofliam avatar May 01 '24 18:05 worksofliam

If it proves impossible to implement, then at least it shouldn't even show the dialog. That is what is really confusing about the current situation.

Jon Paris

@.***

On May 1, 2024, at 2:40 PM, LJ @.***> wrote:

I don't believe there is an easy way for us to make save as work for streamfiles or members. I tried many months ago with much failure due to some API limitations. I will take a look again.

— Reply to this email directly, view it on GitHub https://github.com/codefori/vscode-ibmi/issues/2004#issuecomment-2088903447, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGZWQLT55K7G3OTY4YRHNDZAEZJNAVCNFSM6AAAAABGVPWVP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYHEYDGNBUG4. You are receiving this because you commented.

JonFP avatar May 01 '24 21:05 JonFP

I think there is a way to make it work...I'll give it a try next week 😉

sebjulliand avatar May 02 '24 17:05 sebjulliand

@JonFP @jkyeung you can switch to the latest pre-release that includes full support for Save As... Or wait for the next release 😉

Implementing this also enabled browsing from the breadcrumb section at the top of the editor. image

sebjulliand avatar Sep 25 '24 13:09 sebjulliand