mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
TextEditor/FileArgument: Remove file existance check for early exit
This check was fine earlier when we had access to the full filesystem, but now that we are moving away from applications having unveiled access to the filesystem, this check would just get rejected from the kernel. This is rare / fast enough that performance should not really matter in any case.
This commit is contained in:
parent
63ff5873d8
commit
8378ecc67b
1 changed files with 0 additions and 6 deletions
|
@ -15,12 +15,6 @@ FileArgument::FileArgument(String file_argument)
|
|||
m_line = {};
|
||||
m_column = {};
|
||||
|
||||
if (Core::File::exists(file_argument)) {
|
||||
// A file exists with the full specified name, don't attempt to parse it.
|
||||
m_filename = move(file_argument);
|
||||
return;
|
||||
}
|
||||
|
||||
// A file doesn't exist with the full specified name, maybe the user entered line/column coordinates?
|
||||
Regex<PosixExtended> re("^(.+?)(:([0-9]+):?([0-9]+)?)?$");
|
||||
RegexResult result = match(file_argument, re, PosixFlags::Global | PosixFlags::Multiline | PosixFlags::Ungreedy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue